Hello all,
There seems to be a couple of ways to obtain all OUs with "something" in their name - in my case I'm seaching for all OUs called "XP" and then my aim is to discover if these OUs contain any Windows 7 clients by mistake.
Get-ADObject -Filter 'Name -like "XP"' | Select-Object DistinguishedName
this returns a list of all of our XP OUs.
So I'd then like to send this result over to get-adcomputer and populate the -searchbase value with the values discovered above....the theory seemed simple but I'm not having much luck...
Any help appreciated, thanks
C
Carl Barrett | Twitter: @Mosquat