How to create a shortcut using PowerShell

I don’t know any native cmdlet in powershell but you can use com object instead: $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut(“$Home\Desktop\ColorPix.lnk”) $Shortcut.TargetPath = “C:\Program Files (x86)\ColorPix\ColorPix.exe” $Shortcut.Save() you can create a powershell script save as set-shortcut.ps1 in your $pwd param ( [string]$SourceExe, [string]$DestinationPath ) $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut($DestinationPath) $Shortcut.TargetPath … Read more