Whoami Command In Windows Server 2008
In this article I am going to explain about Whoami Command in Windows Server 2008 operating system and also explain it's related syntax.
Introduction
This command basically used for displays user, group and privileges information for the user who is currently logged on to the local system. If we will used this command without parameters it will displays the current domain and user name.
Syntax
whoami [/upn | /fqdn | /logonid]
whoami {[/user] [/groups] [/priv]} [/fo <Format>] [/nh]
whoami /all [/fo <Format>] [/nh] |
Parameter |
Description |
/upn |
Displays the user name in user principal name (UPN) format. |
/fqdn |
Displays the user name in fully qualified domain name (FQDN) format. |
/priv |
Displays the security privileges of the current user. |
/logonid |
Displays the logon ID of the current user. |
/user |
Displays the current domain and user name and the security identifier (SID). |
/groups |
Displays the user groups to which the current user belongs. |
/fo <Format> |
Specifies the output format. Valid values include:
table Displays output in a table. This is the default value.
list Displays output in a list.
csv Displays output in comma-separated value (CSV) format. |
/all |
Displays all information in the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to. |
/nh |
Specifies that the column header should not be displayed in the output. This is valid only for table and CSV formats. |
/? |
Displays help at the command prompt. |
Example
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here