• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Powershell / Active Directory Modification

VinylxScratches

Golden Member
I need a little help on where to look at for this.


Say I have users and their physicalDeliveryOfficeName attribute, called Office is set to New York, and others say Chicago.


I want to setup a script that will loop through all users.

If physicalDeliveryOfficeName = Chicago
Set address properties
Street: 8888 Chicago Lane
City: Chicago
State: IL
Zip: 60066

else if physicalDeliveryOfficeName = New York
Set address properties
Street: 9999 New York Lane
City: New York
State: NY
Zip: 11111

I can't seem to find out where to start.. any pointers?
 
You'll first want to look up setting LDAP properties on objects. Then you'll want to look at scripts that enumerate all of the user objects in a particular OU.

I would do this as two scripts: the first script would enumerate users in an OU (there may already be a cmdlet to do this) which would be piped to the second script, which would set the properties. It's pretty straightforward, once you get the hang of the LDAP syntax.

You may even be able to do it more easily with the user object. Search both.
 
Back
Top