DSapseid Posted August 23, 2012 Posted August 23, 2012 I want to add printers using the script on the wiki but want it to the use the location on the location tab in AD rather than the computer name. Is that possible? Eg if location is R40 then add printers x & y
DSapseid Posted August 29, 2012 Author Posted August 29, 2012 would something like this work? Ive hardly used vb so not sure, just found it on google! Set objComputer = GetObject _ ("LDAP://CN=DCNAME,DC=SCHOOL,DC=local") objProperty = objComputer.Get("Location") If IsNull(objProperty) Then Wscript.Echo "The location has not been set." Else Wscript.Echo "Location: " & objProperty objProperty = Null End If Where school.local is my domain name.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now