Category Archives: PowerShell

Powershell GetADUser Name vs DisplayName

When using GetADUser usually we are using the default properties it return. This usually not the case and when we were using it as the property Name it doesn’t update when user’s name got updated. To facilitate this use DisplayName.

$user= Get-ADUser -Filter {UserPrincipalName -eq ’[email protected]’ -or EmailAddress -eq ’[email protected]’} -Properties EmailAddress,DisplayName

$user.DisplayName