Get-ADComputer -Filter 'operatingsystem -like '*server*' -and enabled -eq 'true'' ` To retrieve all enabled Windows Servers sorted by operatingsystem, we need to target the operating system attribute. If you want to join in, open PowerShell (powershell.exe) or PowerShell ISE (ise.exe). Finally I will query all domain-computers and sort them by operating system. I will successively retrieve all enabled Windows Servers, Windows Clients and Domain-Controllers and display them separately. In this blog post I will carry out some PowerShell commands to get a list of domain-computers filtered by operating system. Of course, this also includes user and computer accounts.
As an administrator, you should have an overview of your Active Directory environment.