Where am I logged into and as Whom?

Applies to: Windows

What are the quickest ways to determine the computer you are logged into, and with which credentials?

1. Determine Computer Name

In Command prompt:

hostname

hostname-cmd

This works equally well in PowerShell.

hostname-ps

2. Determine Logged-In User

whoami

whoami-cmd

Same for PowerShell.

whoami-ps

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>