How to set location to a mapped network drive in PowerShell?
Solution 1:
The problem you're running into is because the Z:
drive is mapped in your user's context, but not in the "administrator" context.
So when you run PowerShell "As Administrator" the Z: drive (map) doesn't exist and if you want it, you'd have to create it in that context for it to be available.