MSFT_Computer.Description Property
Gets the description for the computer.
string MSFT_Computer.Description
Access
Read/write
Return Value
String
Examples
The following example shows the use of the Description property.
'*********************************************************************
' Routine: Function CreateNonWindowsComputer
' Purpose: Adds a new computer for MOM to monitor.
' Arguments: The server running MOM, computer domain, computer name.
' Returns: The GUID of the new computer.
'
'**********************************************************************
Const TYPE_NONWINDOWS = 8192
Function CreateNonWindowsComputer(strMOMServer, strDomain, strComputerName)
Dim objComputerClass
Dim objNewComputer
Dim objScriptTypeLib
Dim strGUID
' generate a new GUID using a Windows Script Component object
Set objScriptTypeLib = CreateObject("Scriptlet.TypeLib")
strGUID = Left(objScriptTypeLib.GUID, 38)
Set objScriptTypeLib = Nothing
' get class information for MSFT_Computer
Set objComputerClass = GetObject("WinMgmts://" & strMOMServer & "\root\MOM:MSFT_Computer")
' create a new instance
Set objNewComputer = objComputerClass.SpawnInstance_
' set required properties
objNewComputer.Guid = strGUID
objNewComputer.Name = strComputerName
' set additional properties
objNewComputer.Domain = strDomain
objNewComputer.Type = TYPE_NONWINDOWS
objNewComputer.Description = "A computer added via WMI."
' save new object to WMI
Call objNewComputer.Put_
Set objComputerClass = Nothing
Set objNewComputer = Nothing
CreateNonWindowsComputer = strGUID
End Function
Requirements
Platforms: Requires Windows 2000 Server or later
Version: Requires MOM 2000 SP1 or later