Integrating WhoAmI Into PowerShell

by May 24, 2012

There is a cool little tool called whoami.exe which is part of Windows ever since Windows Vista. Since it can provide results not just in plain text but also as comma separated values, it is very easy to integrate into PowerShell. For example, to find out the groups your user account is member of, try this simple line:

PS> whoami /groups /fo csv | convertfrom-csv

Twitter This Tip! ReTweet this Tip!