get-adgroup -filter "SID -like '*-512'"

Viewed 6428

I have been wanting to figure out how to use -filter to get what I want. What I am trying to do is find the Domain Admins group by a -like statement of *-512 against the SID property using the following:

get-adgroup -filter "SID -like '*-512'"

It works if I put the actual SID

get-adgroup -filter "SID -eq 'S-1-5-21domain-512'"

I know doing it this way will work

get-adgroup -filter * | ? {$_.SID -like '*-512'}

https://support.microsoft.com/en-us/help/243330/well-known-security-identifiers-in-windows-operating-systems

1 Answers
Related