Sometimes you have to ask for your own group membership or you write a script and have to get the memberships. Everybody knows the command whoami but does you know that you can convert it to CSV with PowerShell.
WHOAMI /GROUPS /FO CSV /NH | ConvertFrom-Csv -Header 'GroupName','Type','SID','Attributes'
![](http://tiedemanns.info.www1.your-server.de/posh-samples.com/wp-content/uploads/2021/12/2018-07-17-09h20-29.png)
Then you have a PowerShell object and you can make a filter, select or whatever.