If I RDP to ServerA (2008R2) as userB (Domain User) and open a PS (2.0) command window, I can successfully run:
New-PSdrive -Name "X" -PSProvider FileSystem -Root "\\MYSERVER\MyShare"
But if I RDP to ServerA and launch c:\scripts\myscript.ps1 from a PS window (myscript contains the same line of code), drive X: is not mapped!
Does the script run under different permissions? Permissions on folder c:\Scripts are wide open: Everyone = Full Control. The Scripts folder needs to reside in a location where all users can access it.
How do I get New-PSdrive to work in myscript?
thx