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 Research Triangle Powershell User Group remote-capable.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
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |