Combine them with an '-and' operator:
Get-ADComputer -Filter "OperatingSystem -Like '*Windows Server*' -and Enabled -eq 'True'"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everyone!
I know the following command that lists Windows Servers
Get-ADComputer -Filter { OperatingSystem -Like 'Windows Server'}
But i want to show enabled Servers only... How do i use two filters in the same command?
I know this seems a very newbie question but i'm newbie on Powershell, so... :|
Thanks in advance!
Answer accepted by question author
Combine them with an '-and' operator:
Get-ADComputer -Filter "OperatingSystem -Like '*Windows Server*' -and Enabled -eq 'True'"