Or try to do consistent quoting to pass parameters to an external executable. It's mind-blowing that a fundamental feature for a scripting language - interfacing to other commands - is so complicated. I have in some instances ended up passing parameters to batch files as environment variables. That works reliably. And then there was the lovely incident with invisible files in an earlier version of PS. I called out to a batch file that created files on a network drive. Unfortunately, when I returned to PS the files were invisible until PS was restarted. Not a happy experience, when the PS was supposed to process backup files produced by the batch file. Caused me a good deal of lost hours - and backups! And yes, the function return value mystery. Who ever thought that was a good idea ? I have really tried to like PowerShell. It feels like it should be a major step up from MS-DOS scripting with proper flow control, error handling, etc. But now I try to stay away from it, as it usually ends up eating my time, especially when I need to make it talk to existing scripts. One success story: I did a PS script that read a file and processed it via a .NET library. That was easy, clear code, and no surprises.