This may be an extreme edge case, but since I spent a few hours on something rather trivial, I though I should share it. When running Invoke-Command from powershell invoked via command line – be wary of the curly braces. What is the difference between the following two commands? powershell.exe -Command “& {invoke-command {throw ‘error’}}” [...]
A quick note about exit codes from powershell
January 19th, 2012 by Jakob Nilsson-Ehle — .Net
Tags: .Net, powershell
