Q: I’m writing a PowerShell script that calls robocopy to copy some directories. Since robocopy isn’t a PowerShell command it doesn’t return error codes in the PowerShell $error variable. How do I get return codes from command programs like robcopy?
↧