OK, this has been written in PowerShell but its heavily based on VBS. I was wondering, is there a way to do this in “pure” PowerShell ?
$WshShell = New-object -comObject WScript.Shell
$Shortcut = $WshShell.createShortcut("C:\users\$($env:USERNAME)\Desktop\notepad.exe - Shortcut.lnk")
$Shortcut.TargetPath = "C:\Windows\system32\notepad.exe"
$Shortcut.Save()