This works for me using v3.60 on NT4 SP4:

$logfile = "test.log"
shell '%COMSPEC% /c xcopy bogus_file >$logfile 2>&1'

Test.log captures this output:

File not found - bogus_file
0 File(s) copied