WSH » wshnetwork » ComputerName

Syntax:
WshNetwork.ComputerName

The ComputerName property is read only and returns a string which is the current computer's name.

Examples

Code:
WScript.Echo("ComputerName =", WshNetwork.ComputerName)
Output:
ComputerName = DevGuru Server
Explanation:

The following JScript code illustrates the use of this property under WSH 2.0 on a Windows 2000 system.

Language(s): JavaScript