If you're still writing custom PowerShell scripts for basic file transfers and Excel reports, you're working too hard. Ready-made PowerShell modules handle most common tasks better than anything ...
I'm used to my scripts being moved from one server to the other and magically not working. But this is a little extreme. PS C:\Users\Administrator> Import-Module PrintManagement -Verbose VERBOSE: ...