Hello there,
I tried to write a script to list all Windows core servers in my domain. I used the following commands. It worked very slow because it needed to load the features from every servers. Do you have a doable solution? Thanks a lot!
$computeNames = Get-ADComputer -Filter {OperatingSystem -Like "*Server*"} -Properties Name
foreach ($name in $computeNames.Name) {
Get-WindowsFeature -ComputerName $name | Where-Object {$_.Name -eq 'Server-Gui-Shell'}
}