Find Windows 10/11 Pro computers in Active Directory
Get-ADComputer -Filter “OperatingSystem -eq ‘Windows 10 Pro’ -or OperatingSystem -eq ‘Windows 11 Pro’” | ft
Get-ADComputer -Filter “OperatingSystem -eq ‘Windows 10 Pro’ -or OperatingSystem -eq ‘Windows 11 Pro’” | ft
Get-ADUser -filter * -Properties * | ? {$_.showInAddressBook -ne $null} | Select-Object CN,SamAccountName,showInAddressBook