JSI Tip 10293. How does a Vbscript determine the NetBIOS domain name, ComputerName, and UserName of the logged on user?

Jerold Schulman

March 20, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

To determine the NetBIOS domain name, ComputerName, and UserName of the logged on user:

Set WshNetwork = WScript.CreateObject("WScript.Network")WScript.Echo "Domain = " & WshNetwork.UserDomainWScript.Echo "Computer Name = " & WshNetwork.ComputerNameWScript.Echo "User Name = " & WshNetwork.UserName



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like