Home » PowerShell » Get AdUser Description From Active Directory

Get AdUser Description From Active Directory

Use the Get-AdUser cmdlet in PowerShell to get aduser description from the active directory. AdUser object has an attribute Description, using the Select or Select-Object command, you can get an aduser description.

The Description attribute contains the additional information or comments associated with the active directory user account.

In this article, we will discuss how to get aduser description from the active directory using the Get-AdUser cmdlet.

Get AdUser Description

To get aduser description from the active directory using PowerShell script, use the Get-AdUser cmdlet.

Get-ADUser -Identity Dev.NewHouse -Properties Description | Select-Object -ExpandProperty Description

In the above PowerShell script, the Get-AdUser cmdlet uses the Identity parameter to specify the aduser. The Properties Description parameter specifies that you want to include the “Description” attribute in the result and pipes the aduser object to the Select-Object cmdlet.

The Select-Object uses the ExpandProperty parameter to specify a property to select, in our case it is aduser Description.

The output of the above PowerShell script to get aduser description as EU-DEVOPS

PS C:\> Get-ADUser -Identity Dev.NewHouse -Properties Description | Select-Object -ExpandProperty Description
EU-DEVOPS

PS C:\>

If you don’t have the aduser Description set, it will return the aduser description as empty or blank.

You can refer to the below code as well to get aduser description using the Get-AdUser cmdlet.

Get-ADUser -Identity Dev.NewHouse -Properties Description | Select Description

In the above PowerShell script, the Get-Aduser cmdlet uses the Identity parameter to specify the aduser to get a description and pipes the aduser object to the Select cmdlet.

The Select command uses the Description property to get aduser description attribute value.

The output of the above PowerShell script to retrieve aduser description attribute value from the active directory is:

Get AdUser Description
Get AdUser Description

Cool Tip: How to get the enabled adusers in PowerShell!

Conclusion

I hope the above article on how to get aduser description using the Get-AdUser cmdlet is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.