Im a noob at powershell, i need some help; I want to create a shortcut to 2 different paths, to my desktop and documents folder. This is my script:
$SourceFileLocation = "C:\AAA\BBB\CCC.exe"
$ShortcutLocation = “C:\Users\AAA\Desktop\BBB.lnk”
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation)
$Shortcut.TargetPath = $SourceFileLocation
This work fine for creating one shortcut. Yet, i want to add a second path to the $Shortcutlocation variable. A simple comma does not seem to work. Any ideas how to do this?