Set-AdUser has a manager attribute that is used to set active directory user manager. Let’s consider an example to set aduser Smith manager.
In the above example, Set-ADUser command update SAM account smith user HomePage property to and LogonWorkstations property to it-20-dekstop and it-20-laptop Get AD User and set-aduser manager property Set active directory user HomePage property Set-ADUser smith -HomePage '' -LogonWorkstations 'it-20-dekstop,it-20-laptop' In the above example, Set-ADUser command sets job, title, and department properties to the user object with SAM account name smith. It uses Set-ADUser -Identity parameter to identify user based on a distinguished name.Ĭool Tip: Get email address using Get-ADUser in PowerShell! Set active directory user job title and department Set-ADUser -Identity "smith" -Department "Asia_Sales" -Title "Manager" In the above example, Set-ADUser command updates user “smith” email address in the active directory account. Set-ADUser -Identity smith -EmailAddress ' ' If you want to set active directory user email address, use PowerShell Set-AdUser cmdlet to update the EmailAddress attribute of aduser. Using Set-Aduser to set aduser email address Let’s see below Set-AdUser examples to set aduser attributes, email address, set-aduser manager, and so on. Set-AdUser cmdlet modifies an active directory user properties Set-ADUser If the Active Directory module is not available then follow the Active Directory installation steps. This command returns all the modules installed and available in the system. Tip: To know about which modules are available in the system, run the below command in PowerShell ISE Get-Module -ListAvailable User with administrator access or have enough access to read Active Directory information.PowerShell ActiveDirectory Module to be installed.To use the set-aduser cmdlet, the system needs to have the following requirements: Set-AdUser cmdlet is one of the Active Directory cmdlets.