I am trying to permanently map a drive on XP computer (has instaled PS V2) over a PowerShell Remote session with a admin privileges. I tried this advice: Net.exe use 'Error: A command was used with conflicting switches.' while using /savecred
[zikaz-7]: PS C:\Users\administrator\Documents> net use V: \\CNBS-Test\Storage
/savecred /P:yes
and I get this error instead of being asked for username and pass:
The password is invalid for \CNBS-Test\Storage.Enter the user name for
'CNBS-Test': net.exe....The operation was canceled by the user.
and when I try like this:
[zikaz-7]: PS C:\Users\administrator\Documents> net use V: \\CNBS-Test\storage
/persistent:yes /savecred /user:domain2003\admistrator admin123
I get "A command was used with conflicting switches" error becouse of /user and /savecred.
I can map whitout /savecred but it only last until reboot. I tried bouth of them without /persisten but get the same resoult, and I looked on every forum I could fined and everywhere they said one of those two examples. How do I solve this problem, am I writeing something wrong in the first example or that can not work over PS remote session? Or do I have to import -credential and then /savecred on that, or something like that?
It sounds like a variation on the double-hop problem - From computer A, you remotely execute something on computer B, which tries to access computer C.
You can get around this by using Cred-SSP; special steps may be required on the XP machine.