Link to home
Start Free TrialLog in
Avatar of reredok
reredokFlag for Germany

asked on

Powershell and robocopy

Hi Experts,

is there any way to ascertain if a robocopy call in Powershell support the /MT:n switch before running robocopy. Remember robocopy before Windows 2008 R2 Server have no /MT Switch.
$LASTEXITCODE give only "success" or "fail" (ERRORLEVEL) but not if the robocopy Version support the switch.

Thanks++

reredok
ASKER CERTIFIED SOLUTION
Avatar of reredok
reredok
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Qlemo
There could be a more recent Robocopy somewhere copied to the system, but yes, the OS release check should work in general. Parsing e.g. robocopy help would be more reliable, though.