Home > Computers > Making AD Changes using PowerShell (Company Attribute)

Making AD Changes using PowerShell (Company Attribute)

Note – This post deals with making bulk changes to Active Directory. If you’re not careful you could really screw things up. Always test in a lab before making such changes in production.

This is just a quick post for a little something I had to do today. I’ve been doing some Active Directory cleanup & noticed we have some users that have the Company attribute populated & some that don’t.

Using the Quest ActiveRoles Management Shell for Active Directory (http://www.quest.com/powershell/activeroles-server.aspx) I ran the following cmdlet to add the correct company name to all users in a specific OU & all sub-OUs who do not have the Company attribute populated.

Get-QADUser -SearchRoot "abc.com/ABC/Users" -Company "" | ForEach-Object{Set-QADUser -Identity $_ -Company "ABC Company"}
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: