I now have copied xcopy.exe locally, but it's still acting the same way.
It claims to have run it, but there is no output from it on either stdout or stderr even if I call it without any parameters just to see an error response, yet stdout is working when using a wmic query as a test.
Here is one stdout example (this is the output, not the script but the script looks similar):
D:\users\Ellen\Scripts\Temp>d:\users\ellen\Scripts\Temp\xcopy.exe
[should have seen an error message here.]
D:\users\Ellen\Scripts\Temp>xcopy.exe /?
[should have seen the help message here.]
D:\users\Ellen\Scripts\Temp>wmic computersystem get username
UserName
DGILINUX\ellen