In large organizations, applying GPOs to specific computers is often complex. Moving similar computers to a dedicated OU simplifies GPO management but identifying the right computers among thousands of entries presents a challenge. To simplify this process, you can search for computers based on naming conventions, operating systems, or other attributes to pinpoint the desired ones and ensure precise GPO application.
Below are some use cases that can help you search against a large list of computers.
If your organization's computers follow a naming convention with department or role prefixes, use the below PowerShell cmdlet to list computers that start with a certain name.
Get-ADComputer -Filter {Name -like "WI*"} -Properties *|
Select-Object Name, IPv4Address, OperatingSystem, Enabled, WhenCreated
|Format-Table
This will list all computers in your domain with names starting with WI.
When planning an OS upgrade or identifying outdated systems for decommissioning, it is crucial to pinpoint computers running a specific operating system in Active Directory. Use the cmdlet below to find all machines running a particular OS version.
Get-ADComputer -Filter "OperatingSystem -like 'Windows 11*'" -Properties *|
Select-Object Name, IPv4Address, OperatingSystem, Enabled, WhenCreated
|Format-Table
The above cmdlet retrieves computers running Windows 11 in your Active Directory domain.
Imagine a scenario where you need to list only the client workstations in Active Directory. Since the computer list includes all machines (member servers and domain controllers), you can use the cmdlet below to retrieve only the workstations.
Get-ADComputer -Filter "OperatingSystem -notlike '*server*'" -Properties * |
Select-Object Name, IPv4Address, OperatingSystem, Enabled, WhenCreated
|Format-Table
Search for multiple computers in a single report without complex navigation!
You can use AdminDroid’s rich filtering functionality to retrieve the computer list based on your requirements.
- Computer Name prefixes to find machines following specific naming conventions.
- Machine Type, such as domain controllers, workstations, or member servers.
- Computer Status, whether enabled or disabled.