VBScript to change user home directory with username variable

Set CNUsers = GetObject (LDAP://OU=test,DC=N2NetworkSolutions,DC=com)
CNUsers.filter = Array(“user”)
For Each user in CNUsers
  user.HomeDirectory = “
N2File01users” & user.samaccountname ‘UNC
  user.HomeDrive = “H:” ‘ Letter to Map the HomeDirectory UNC to
  user.setinfo
Next

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply