Is there a simpler way to log into a local account on a domain workstation?
Occasionally I need to log into a local machine account on a Windows workstation joined to our domain. The syntax for specifying a domain account looks like this:
DOMAINNAME\myusername
whereas the syntax for logging into a local account is
HOSTNAME\myusername
The problem is that I often don't know the host name off the top of my head. It is possible to find out by clicking the "How do I log onto another domain" link, but this requires me to memorize or write down an often cryptic hostname. Is there another, simpler way to do this?
You can use a period to represent the local host name when logging in.
So, .\Administrator
would be the local administrator account.
You can also use "local" to represent the name of the machine you're logging into.
So local\Administrator
would be the local admin account on the server you're logging into.
I find this useful when RDP'ing into a remote server. The .\Administrator
trick doesn't work in RDP because it will resolve that to <my client machine name>\Administrator
, not <remote server name>\Administrator
.
In general I find it shorter to type "local" than the remote machine name. It also makes it easy to create a new saved connection from an existing one - just change the server name then Save As to save the modified connection, no need to change the user name (assuming you use the same local admin account name on all your remote servers, eg they're all named <host name>\Administrator
, or all named <host name>\LocalAdmin
).