Creating Windows Shortcuts with Powershell, problems with spaces in the Target Path Creating Windows Shortcuts with Powershell, problems with spaces in the Target Path powershell powershell

Creating Windows Shortcuts with Powershell, problems with spaces in the Target Path


From MSDN:

This property is for the shortcut's target path only.

You can add arguments to the shortcut in the Argument's property.

$shortcutX.Arguments = "-- switch"

On my box (Windows 7 Pro), I can make shortcut with the path destination having spaces.