Microsoft® Windows® Script Host ComputerName Property |
WSH Reference Version 1 |
Provides a string representation of the computer name.
object.ComputerName
Part Description object WshNetwork object.
The following example echoes the current computer name and user name:Set objNet = WScript.CreateObject("WScript.Network") WScript.Echo objNet.ComputerName & " - " & objNet.UserName