Create a shortcut with something like this as the “Target”:
powershell.exe -command "& 'C:\A path with spaces\MyScript.ps1' -MyArguments blah"
More Related Contents:
- What’s the best way to determine the location of the current PowerShell script?
- Save hash table in PowerShell object notation (PSON)
- When should I use Write-Error vs. Throw? Terminating vs. non-terminating errors
- How to get disk capacity and free space of remote computer
- How do I write to standard error in PowerShell?
- Recursive file search using PowerShell
- Get remote registry value
- How to get an MD5 checksum in PowerShell
- Obtaining ExitCode using Start-Process and WaitForExit instead of -Wait
- Redirection of standard and error output appending to the same log file
- How do I get only directories using Get-ChildItem?
- Web.Config transforms outside of Microsoft MSBuild?
- copy-item With Alternate Credentials
- PowerShell – Decode System.Security.SecureString to readable password
- How do I concatenate two text files in PowerShell?
- How do I include a locally defined function when using PowerShell’s Invoke-Command for remoting?
- Extract the filename from a path
- How to export data to CSV in PowerShell?
- Comparing array variables in PowerShell
- Copy file remotely with PowerShell
- How to speed up Powershell Get-Childitem over UNC
- Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)
- PowerShell script to check the status of a URL
- Gracefully stopping in Powershell
- Can’t install nuget package because of “Failed to initialize the PowerShell host”
- PowerShell The term is not recognized as cmdlet function script file or operable program
- PowerShell is missing the terminator: “
- Using PowerShell to remove lines from a text file if it contains a string
- What security setting is preventing Remote PowerShell 2.0 from accessing UNC paths
- Prevent trailing newline in PowerShell Out-File command