Create Shortcut On Desktop Windows 11 [work] May 2026
$Desktop = [Environment]::GetFolderPath("Desktop") $Name = [System.IO.Path]::GetFileNameWithoutExtension($TargetPath) $ShortcutPath = Join-Path $Desktop "$Name.lnk"
$WScript = New-Object -ComObject WScript.Shell $Shortcut = $WScript.CreateShortcut($ShortcutPath) $Shortcut.TargetPath = $TargetPath $Shortcut.Save() create shortcut on desktop windows 11