Modifying an Attribute for Several Users at Once
Updated: February 28, 2009
Applies To: Windows Server 2008 R2
This topic explains how to use the Active Directory module for Windows PowerShell to modify an attribute in Active Directory Domain Services (AD DS) for several users at once.
The following example demonstrates how to retrieve the user objects in the organizational unit (OU) Finance and set their description attribute:
Get-ADUser -Filter 'Name -like "*"' -SearchBase "OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM" | Set-ADUser -Description "Member of the Finance Department"
You can use the following parameters when you set many of the common values that are associated with a user object in AD DS:
In addition to the standard Lightweight Directory Access Protocol (LDAP) attributes, you can retrieve the following extended properties of the Get-ADUser cmdlet by using the -Properties parameter:
For a full explanation of the parameters that you can pass to Set-ADUser or Get-ADUser, at the Active Directory module command prompt, type Get-Help Set-ADUser –detailed or Get-Help Get-ADUser –detailed, and then press ENTER.