Forum Discussion
Rob M
Nov 22, 2021Copper Contributor
Get all AD computers excluding servers
Hi! I am trying to create a script that will retrieve all computers but exclude any servers found. I also discovered that using the most basic command will return about two dozen servers and then cr...
Rob M
Nov 23, 2021Copper Contributor
I looked into this further by testing against all domains. Get-ADComputer works on all domains except for one. How do I determine the root cause so I can escalate this issue to another team?
You are definitely on the right track. 🙂
You are definitely on the right track. 🙂
Rob M
Nov 23, 2021Copper Contributor
Well, this apparently known in my organization. The workaround is to include specific properties in the line of script.
So in our environment, one of our domains will fail when you use -Properties *
If I use, -Properties CN,OperatingSystem, then the script no longer crashes on the domain causing issues.
So in our environment, one of our domains will fail when you use -Properties *
If I use, -Properties CN,OperatingSystem, then the script no longer crashes on the domain causing issues.