Fighting with Arguments

By Michael Flanakin @ 2:37 PM :: 1176 Views :: Development, Tools/Utilities :: Digg it!

Since I first had a chance to really get into it, PowerShell has been great. For the first time, I have a real issue, tho. PowerShell handles arguments differently than cmd.exe. Specifically, the difference is the colon (:). In cmd.exe, arguments are split by spaces; but in PowerShell, the colon translates into a new argument. For instance, myapp.exe -arg1 -arg2:abc translates to { "-arg1", "-arg2:abc" } in cmd.exe, but { "-arg1", "-arg2:", "abc" } in PowerShell. Sure, we can code around this; but why should we?