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.
View and change the title of AD users with PowerShell
April 13, 2017
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)" }}
You May Also Like