Change the title of AD users from PowerShell

View and change the title of AD users with PowerShell

John Savill

April 13, 2017

1 Min Read
Change the title of AD users from PowerShell

Q. How can I view and change the title of AD users via PowerShell?

A. By default many attributes are not returned when fetching an AD user however it is easy to set the exact properties required and then modify. The code below shows an example by specifying the properties to fetch which includes title.

$accounts=Get-ADUser -Filter * -properties sAMAccountName, UserPrincipalName, titleforeach($account in $accounts){  if($account.title.StartsWith("Quality Control Inspector"))  {    $account | Set-ADUser -Title "Developer (MSDN)"  }}

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like