Share via


MSFT_ComputerGroup.Type Property

Gets or sets the type of the computers in this computer group.

 sint32 MSFT_ComputerGroup.Type

Access

Read/write

Return Value

Signed 32-bit integer

Remarks

The following type values are supported.

Value Description
0 Unknown
24 Windows 2000 domain controllers
8192 Non-Windows computer groups
32792 All Windows servers
32793 All Windows computers

Examples

The following example shows the use of the Type property.

'*********************************************************************
' Routine: Function GetComputerGroupType
' Purpose: Gets a descriptive name for a computer group's type.
' Arguments: A MSFT_ComputerGroup object.
' Returns: The readable type name for the computer group.
' Notes: This function also works with MSFT_Computer objects and the
'        type values they support.
'**********************************************************************
Const TYPE_UNKNOWN = 0
Const TYPE_NT_WKS = 1
Const TYPE_PDC = 8
Const TYPE_BDC = 16
Const TYPE_WIN2K_DC = 24
Const TYPE_NONWINDOWS = 8192
Const TYPE_NT_MBR_SRV = 32768
Const TYPE_WIN_SERVERS = 32792
Const TYPE_WIN_COMPUTERS = 32793

Function GetComputerGroupType(objComputerGroup)
    Dim lngType, strType

    lngType = objComputerGroup.Type

    Select Case lngType
        Case TYPE_UNKNOWN
            strType = "Unknown"
        Case TYPE_NT_WKS
            strType = "Windows NT workstations"
        Case TYPE_PDC
            strType = "Primary domain controllers"
        Case TYPE_BDC
            strType = "Backup domain controllers"
        Case TYPE_WIN2K_DC
            strType = "Windows 2000 domain controllers"
        Case TYPE_NONWINDOWS
            strType = "Non-Windows computer groups"
        Case TYPE_NT_MBR_SRV
            strType = "Windows NT member servers"
        Case TYPE_WIN_SERVERS
            strType = "All Windows servers"
        Case TYPE_WIN_COMPUTERS
            strType = "All Windows computers"
        Case Else
            strType = "[Other]"
    End Select

    GetComputerGroupType = strType
End Function
  

Requirements

Platforms: Requires Windows 2000 Server or later

Version: Requires MOM 2000 SP1 or later

See Also

MSFT_ComputerGroup Class | MSFT_Computer.Type Property