Checking User Privileges

by Jun 22, 2012

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

Twitter This Tip! ReTweet this Tip!