I am trying to create a dynamic distribution group for all users under a specific manager based purely on his name, not his dn. For instance, I can create one with the following command
new-dynamicdistribution list -name "Bobs Employees" -RecipientFilter {manager -eq 'CN=Bob Smith,OU=Corp,DC=contoso,DC=com'}
But I can't create one one for anyone who has a Manager attribute with the words "Bob Smith" or even "Smith"
The -like condition does not work for this field as I have tried the following and many others.
new-dynamicdistribution list -name "Bobs Employees" -RecipientFilter {manager -like '*Smith*'}
Hell, I can't even get it to work with a simple get-user function like
get-user -filter {Manager -like '*Bob*'} or get-user -filter {manager -like 'cn=bob*'}
Any help out there would be awesome!!!