All Forums >> [Scripting] >> WSH & Client Side VBScript >> Vb script for Homedrv for multiple users . Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I had a script that change the Home directory for mutiple users in the OU , But the only thing that i cannot figured out in this script is to How to Put the $ after username for Ex .. We have a user with a username of JOHN and his home directory look like \\Servername\JOHN$ .. So the only thing i cannot figured out in this script to to put the $ after the username .. Thanks if anyone can help. Here is my script
set objParent = GetObject(LDAP://(parentou)) objParent.Filter = Array("user") for each objUser in objParent Wscript.Echo "Modifying " & objUser.Get("sAMAccountName") objUser.HomeDirectory = "\\Servername\" & _ objUser.Get("sAMAccountName") objUser.Put "homeDrive", "P:" objUser.SetInfo Next