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
would something like this work? Ive hardly used vb so not sure, just found it on google!
Where school.local is my domain name.Code: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
There are currently 1 users browsing this thread. (0 members and 1 guests)