Set WshNetwork = WScript.CreateObject("WScript.Network") WScript.Echo "Computer Name = " & WshNetwork.ComputerName