
If the link already exists and you want to programmatically inspect and change one you can do $shell = New-Object -ComObject WScript.Shell Once we are happy with what we've created, we finally call Save() to actually persist that link to the path specified.

It won't actually create the link yet, it just initializes the object.įrom there we set TargetPath to the target executable we want to run when the user clicks on it, you can also set other properties like Arguments, WorkingDirectory, IconLocation, and so on. The path we specify is the path where we want to create the link at. $shortcut.TargetPath = "C:\Windows\System32\cmd.exe"įirst off we create a WScript.Shell object, next we create the link object using the CreateShortcut method. $shortcut = $shell.CreateShortcut("C:\temp\shortcut.lnk") You still need to use the Shell object to manage shortcuts but it can be quite simple in PowerShell $shell = New-Object -ComObject WScript.Shell Copy this file to the appropriate Motocross The Force folder location: Windows 10: C:UsersTesterDesktopMotocross The Force. Click the appropriate 'Download Now' button and download your Windows file version. Research Triangle Powershell User Group remote-capable Locate your Windows operating system version in the list of below 'Download Open Folder.lnk Files'.Philadelphia PowerShell User Group remote-capable.Madison Power Users Group remote-capable.Denver Microsoft Enterprise Management User Group.NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions. Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Submission Guidelines | Link Flair - How To
