Mapping network drive works in DOS prompt but fails in PowerShell
i'm stuck on one. need map local drive letter windows share on remote machine , must pass credentials access it. i'm doing this:
net use "f:" "\\servername\share" mypassword /user:mydomain\my.dotted.user.name
all stuff in italics showing real info goes.
so works when in dos prompt window. can view mapped drive entering "net use". can view mapped drive in powershell "net use". can delete mapped drive in powershell "net use "f:" /delete".
however, when run command map drive in powershell "system error 86 has occurred" , "the specified network password not correct". know domain, user name, , password correct. have reset password several times. have verified there isn't time synchronization issue between machine , remote server.
why mapping drive failing in powershell?? grateful suggestions.
thanks.
stephanie
if password contains symbol '$' - try using single quotes.
$pass = 'password'
Windows Server > Windows PowerShell
Comments
Post a Comment