If I run this command:
$LinkedGPOs = Get-ADOrganizationalUnit -Filter 'Name -like "*MyOU*"' | select -ExpandProperty LinkedGroupPolicyObjects
I get back a list of linked GPO's. I need to run it with the filter looking for a variable, like this:
$LinkedGPOs = Get-ADOrganizationalUnit -Filter 'Name -like "*$_.OrganizationalUnit*"' | select -ExpandProperty LinkedGroupPolicyObjects
I think it should be simple, but I've had no luck guessing around.
Thanks for the assist.