This is what I have:
Get-ADComputer -Filter * -Properties MemberOf | Where-Object { $_.MemberOf -NotIn "{CN=WSUS Servers,CN=Computers,DC=ts,DC=local}" } | select Name | Export-Csv C:Temptest.txt
It still returns every computer.
submitted by /u/echo310infantry
[link] [comments]
The post List computers not part of group not working appeared first on How to Code .NET.