Can you help me with this oneliner? I've tried a different syntax, but to no avail. I want to find all user accounts that have one specific manager and the manager needs to be specified by mail.
Get-ADUser -Filter {manager -eq ((Get-ADUser -Filter {mail -eq "name@company.com"}).DistinguishedName)} -Properties AccountExpirationDate | select samaccountname, AccountExpirationDate
Adam.