TomRiddle
-
Total Posts
:
620
- Scores: 12
-
Reward points
:
0
- Joined: 2/7/2008
- Location: Australia
-
Status: offline
|
Syntax - Running a PowerShell script that has spaces in path.
Wednesday, July 21, 2010 1:28 AM
( permalink)
PS C:\> PowerShell "& 'C:\script with spaces.ps1'" C:\> PowerShell –noexit "& 'C:\script with spaces.ps1'" PS C:\> Invoke-Expression "& 'C:\script with spaces.ps1'"
-join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:Syntax - Running a PowerShell script that has spaces in path.
Wednesday, July 21, 2010 1:39 AM
( permalink)
Don't forget that you can use dot sourcing to execute the script in the current scope as well: PS C:\> . 'C:\script with spaces.ps1'
|
|
|
|