http://stackoverflow.com/tags/powershell/info
Common Gotchas
Executing EXEs via a path with spaces requires quoting the path and the use of the call operator – &
| |
Calling PowerShell functions does not require parenthesis or comma separated arguments. PowerShell functions should be called just like a cmdlet. The following examples demonstrates the problem caused by this issue e.g.:
| |
Note that both ‘James’ and ‘Bond’ are packaged up as a single argument (an array) that is passed to the first parameter. The correct invocation is:
| |
Note that in PowerShell 2.0, the use of Set-StrictMode -version 2.0 will catch this type of problem.