I have a script that is supposed to search for computers in different OUs with the same name in AD. eg.
Get-ADComputer -filter * -Searchbase "OU=domain,DC=home,DC=com" -properties * | Where-Object {$_.DistinguishedName -like "*XXX09*"} | Select name, DistinguishedName Everything works fine, but it is terribly slow, is there any way to speed it up, or build the script differently ?