General discussion
July 25, 2003 at 03:43 AM
r3dh@t

WMI script question

by r3dh@t . Updated 23 years, 2 months ago

Hello
The following script (see below) configures address-related attributes for a user in an OU called sales, in coolcomputers.com. Anybody know how to get this to apply to all user in the sales OU, possible using wildcards or variables etc.

XXXXXXXXXXXXX WMI Script XXXXXXXXXXXXXXXXXXXX

Set objUser = GetObject _
(“LDAP://cn=j smith,ou=sales,dc=coolcomputers,dc=com”)

objUser.Put “streetAddress”, “coolcomputer house” & _
VbCrLf & “One cool Way”
objUser.Put “l”, “anyware”
objUser.Put “st”, “UK”
objUser.Put “postalCode”, “123 a11”
objUser.Put “c”, “UK”
objUser.Put “postOfficeBox”, “1234”

objUser.SetInfo

XXXXXXXXXXXXX WMI Script XXXXXXXXXXXXXXXXXXXX

This discussion is locked

All Comments