I have a file in a shared location that I want to copy over to my local harddrive. However I will not be running as a user that has access to the share. So I want to be able to authenticate under a different login (one which does have the permission) and copy the files.
Is there anything I can do to achieve this?
I tried this command (in a ps1 file):
runas /user:domain\username "copy-file $shareloc $destloc"
And I get this error:
RUNAS ERROR: Unable to run - copy-file \\share\some\dir\file.exe C:\dir\file.exe
2: The system cannot find the file specified.