Home Powershell Custom Desktop Shortcut
Post
Cancel

Powershell Custom Desktop Shortcut

Powershell Custom Desktop Shortcut

Script to create a custom shortcut on the Desktop of client machines.

custom-shortcut.ps1

1
2
3
4
$Shell = New-Object -ComObject ("WScript.Shell")
$Favorite = $Shell.CreateShortcut([Environment]::GetFolderPath("CommonDesktopDirectory") + "\CustomShortcutName.url")
$Favorite.TargetPath = "https://docs.nels.one";
$Favorite.Save()
This post is licensed under CC BY 4.0 by the author.