PowerShell script works from command line, not from Task Scheduler. Why?
I switched from using xcopy to Copy-Item, and got a more informative error message. The problem is that the Z: drive is a mapped network drive -- and scheduled tasks can't see it.