You can achieve this goal by using a PowerShell command.
Open up a PowerShell cmd window and enter the following command:
Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion -Wrap –Auto
This command is filtering all computers for all their properties. It then redirects the output into a formatted table.
The only attributes that the table contains are the computer name, operating system description, service pack, and OS version. It also automatically sizes and wraps the data.
In order to find all servers in the domain, run the following command:
Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*"} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto
In order to find all servers running Windows Server 2008, run:
Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*2008*"} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto
In order to find all servers running Windows Server 2008 R2, run:
Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*r2*"} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto
I hope this answers your question.
Edit:
In order to run the Get-ADComputer
command, you will have to install "Remote Server Administration Tools for Windows".
Follow This guide in order to do so.
Then, while in a PowerShell Terminal, type:
import-module activedirectory
And then re-run the Get-ADComputer
command.
Check the following screenshot, you see an error there because the first time I ran the command I didn't have the Active Directory module for PowerShell installed:
