创建快捷方式
$shell = New-Object -ComObject WScript.Shell $desktop = [System.Environment]::GetFolderPath('Desktop') $shortcut = $shell.CreateShortcut("$desktop\SmartPanel.lnk") $shortcut.TargetPath = "calc.exe" $shortcut.IconLocation = "shell32.dll,22" $shortcut.Save()