$ 0 0 I'm sure it executes but since you don't use Execute-Process, the operation does not get logged and we get no feedback on what exit code cscript.exe ended with.