unpersistent drive mapping question


we have large (200+) set of shares to map various users based on group membership via powershell login script.  familiar arguments using gpp item level targeting modern method of mapping shares, , other shares, isn't viable option in case (for reasons won't go into). 

the script works fine with the

(new-object-comwscript.network).mapnetworkdrive($drive, $path, $true)

method of mapping, remove persistent flag (as best practice not script persistent drives).  if manually run command without $true on end (non-persistent), drive appears , works in windows gui , not persistent across log off/on.  however, in login script, while command successful (based on error checking), drive not available in gui. 

does have suggestions why be?

we have number of xp system still, limited powershell v2 although curious if possible using improved "new-psdrive" in posh v3 thread middle-ground between mapping share available outside posh session , doesn't remain persistent after log off. 

thanks.

hi,

based on understanding when run same script logon script, result not same when run manually, if so, think issue may related logon account, how use admin account run logon script?

in addition, hope below article helpful you, can use group policy set user's logon script:

http://www.itninja.com/blog/view/mapping-drives-in-logon-scripts-is-there-a-better-way

regards,

yan li


regards, yan li



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

0x300000d errors in Microsoft Remote Desktop client

Failed to query the results of bpa xpath