Would you like to learn how to query computers related information from Active Directory using Powershell? In this tutorial, we are going to show you how to use Powershell to get information from the Active Directory computers 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 computers information from Active Directory

As an Administrator, start a new POWERSHELL command-line prompt.

Windows 10 - powershell elevated

Get all domain computers from Active Directory.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get all properties from all computer accounts.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get all computers from a specific organizational unit.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get the name of all computers.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get the list of disabled computer accounts.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Count the number of computers grouped by the operating system version.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get the last logon from all computers.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get the list of inactive computers for a specific number of days.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Get all computers with a specific text in the name.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Congratulations! You are able to get computers related information from Active Directory using Powershell.