Looking for a list of Get-ADComputers examples and filters? Then look no further.
The Get-ADComputer cmdlet is used to search Active Directory for computer accounts. You can use it to list all computers in your domain, filter by name, OU, or operating system, and pull specific properties like IP address or last logon date. In this guide, I’ll cover the most common Get-ADComputer examples with ready-to-use commands.
Get-ADComputer Examples
Example 1. Get All AD Computers
get-adcomputer -filter *
This command will get a list of all computers in the domain.
Example 2. Get All Computers with all properties
get-adcomputer -filter * -properties *
This command will get all computers and all of the computer properties (attributes). By default, the get-adcomputer command only displays 8 properties. You must use the -properties * command to list them all.
Example 3. Get All Computers from an OU
Get-ADComputer -Filter * -SearchBase "OU=ADPRO Computers,DC=ad,DC=activedirectorypro,DC=com"
This command will get all computers from a specific OU by using the -SearchBase parameter and the distinguishedName of the OU.
Example 4. Get All Computers and Show Specific Properties
Get-ADComputer -Filter * | select name, Enabled
This command will get all computers and limit the output to display the name and enabled properties only.
Example 5. Get All Enabled Computers
Get-ADComputer -Filter "Enabled -eq 'True'"
This command uses the -filter option to limit the results to only enabled computers.
To limit the properties use the select option followed by the properties you want to display.
Get-ADComputer -Filter "Enabled -eq 'True'" | select Name, Enabled
Example 6. Get All Disabled Computers
Get-ADComputer -Filter "Enabled -eq 'false'" | select Name, Enabled
This command filters for enabled computers and limits the output to the name and enabled properties.
Example 7. Get All Computers with a specific Name (Wildcard Search)
Get-ADComputer -Filter "Name -like 'SRV*'" | select Name, Enabled
This command searches for computers that start with srv in the name field.
Example 8. Get All Computers and IP Addresses
Get-ADComputer -Filter * -properties * | select Name, Enabled,ipv4address
This command gets all computers and displays the IP address of each computer.
Example 9. Get All Computers lastlogondate
Get-ADComputer -Filter * -properties * | select name,lastlogondate
This command gets all domain computers and displays the lastlogondate value.
Example 10. Get All Computers Last Modified Date from an OU
Get-ADComputer -Filter * -SearchBase "OU=ADPRO Computers,DC=ad,DC=activedirectorypro,DC=com" -properties *| select name, whenchanged
This command will get all computers from a specific OU and display the computer’s last modified date (whenchanged attribute).
PowerShell Alternative: AD Pro Toolkit
The AD Pro Toolkit includes over 200 built-in Active Directory Reports for users, computers, groups, GPOs, and security. You can easily get all domain computers or computers from an OU.
You can customize the reports and build your own reports with the report builder.
Download AD Pro Toolkit and see how easy it is to create computer reports.
I hope you found this article useful. If you have questions or comments, please post them below. Refer to the Microsoft documentation to view the complete get-aduser syntax.

