PowerShell: Checking User Privileges

whoami.exe is a useful little tool that ships with Windows 7/Server 2008 R2, and it becomes even more useful when you instruct it to output its result in CSV format. PowerShell can pick up CSV data and turn it into rich objects:

PS> whoami /ALL /FO CSV | ConvertFrom-CSV | Sort-Object UserName

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.