Share via


Finding Computers with a Particular Operating System

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to find computers that are running a particular operating system.

Example

The following example demonstrates how to find computers that are running the Windows Server 2008 operating system:

Get-ADComputer -Filter 'OperatingSystem -eq "Windows Server 2008 Enterprise"'

or

Get-ADComputer -Filter 'OperatingSystem -eq " 6.0 (6001)"'

Additional information

For a full explanation of the parameters that you can pass to Get-ADComputer, at the Active Directory module command prompt, type Get-Help Get-ADComputer –detailed, and then press ENTER.