Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Assign a New Home Drive to a User Who Doesnt Have OneContent of Assign a New Home Drive to a User Who Doesnt Have One.vbsMD5 Hash: 1CBD9C27D4762FE594B31ABF3C4C25D7 |
||
On Error Resume Next
Set objUser = GetObject("LDAP://cn=Ken Myer, ou=Finance, dc=fabrikam, dc=com") If IsEmpty(objUser.homeDirectory) or IsNull(objUser.homeDirectory) Then strUser = objUser.sAMAccountName strHomeDirectory = "\\atl-dc-01\users\" & strUser objUser.homeDirectory = strHomeDirectory objUser.homeDrive = "Z:" objUser.SetInfo End If | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |