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

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

RDS 2012 r2 collections show black screen and then close