Would you like to learn how to query the user information from Active Directory using Powershell? In this tutorial, we are going to show you how to use Powershell to get information from Active Directory accounts using the command-line on a computer running Windows.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Related tutorial – PowerShell
On this page, we offer quick access to a list of tutorials related to PowerShell.
Tutorial Powershell – Get user information from Active Directory
As an Administrator, start a new POWERSHELL command-line prompt.
Get all domain users from Active Directory.
Here is the command output.
Get all properties from all user accounts.
Here is the command output.
Get all users from a specific organizational unit.
Here is the command output.
Get the name and username from all accounts.
Here is the command output.
Get the list of disabled user accounts.
Here is the command output.
Get the list of locked user accounts.
Get the last logon from all user accounts.
Here is the command output.
Get the last logon and status from all user accounts.
Here is the command output.
Get all users with a specific text in the name.
Here is the command output.
Congratulations! You are able to get user-related information from Active Directory using Powershell.