Share via


MSFT_ComputerGroup.Description Property

Gets or sets the description for the computer group.

 string MSFT_ComputerGroup.Description

Access

Read/write

Return Value

String

Examples

The following example shows the use of the Description property.

'*********************************************************************
' Routine: Function ListAllComputerGroups
' Purpose: Prints the names of all computer groups.
' Arguments: The server running MOM.
' Returns: The number of enabled computer groups.
'
'**********************************************************************

Function ListAllComputerGroups(strMOMServer)
    Dim objComputerGroups, objComputerGroup
    Dim lngCount
    Dim strEnabled

    lngCount = 0

    Set objComputerGroups = GetObject("WinMgmts://" & strMOMServer & "\root\MOM").ExecQuery("SELECT * FROM MSFT_ComputerGroup")

    For Each objComputerGroup In objComputerGroups
        ' show and count only the enabled groups
        If (objComputerGroup.IsEnabled = True) Then
            WScript.Echo(objComputerGroup.Name & ", " & objComputerGroup.Type & ", " & objComputerGroup.Description)
            lngCount = lngCount + 1
        End If
    Next

    Set objComputerGroups = Nothing
    Set objComputerGroup = Nothing

    ListAllComputerGroups = lngCount
End Function
  

Requirements

Platforms: Requires Windows 2000 Server or later

Version: Requires MOM 2000 SP1 or later

See Also

MSFT_ComputerGroup Class