Share via


Get-SCClass

Gets classes in Operations Manager.

Syntax

Empty (Default)

Get-SCClass
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromClassDisplayName

Get-SCClass
    [-DisplayName] <String[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromClassGuids

Get-SCClass
    [-Id] <Guid[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromEMO

Get-SCClass
    [-Instance] <EnterpriseManagementObject[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromManagementPack

Get-SCClass
    [-ManagementPack] <ManagementPack[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromClassName

Get-SCClass
    [-Name] <String[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

Description

The Get-SCClass cmdlet gets one or more classes in System Center Operations Manager or an imported management pack. This command can also be executed with Get-SCOMClass.

By default, this cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Examples

Example 1: Get a class by using a name

PS C:\>Get-SCClass -Name "*user"

This command gets all classes that have a name that ends with user.

Example 2: Get a class by using an ID

PS C:\>Get-SCOMClass -Id '08cfb1af-53f7-b5c7-9cea-4f814aa50ff2'

This command gets classes with a specific ID.

Example 3: Get a class by using a display name

PS C:\>Get-SCOMClass -DisplayName 'Operations Manager Management Server Group (Internal)'

This command gets classes with a specific display name.

Example 4: Get classes in a class instance

PS C:\>Get-SCOMClassInstance -DisplayName 'All Management Servers Resource Pool' | Get-SCOMClass

This command gets classes from a pipeline containing class instances.

Example 5: Get classes contained in a management pack

PS C:\>Get-SCOMManagementPack -Name 'Microsoft.Windows.Server.Library' | Get-SCOMClass

This command gets classes from a pipeline containing a management pack.

Parameters

-ComputerName

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). To specify the local computer, type the computer name, localhost, or a dot (.).

The System Center Data Access service must be active on the computer. If you do not specify a computer, the cmdlet uses the computer for the current management group connection.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies the user account under which the management group connection runs. Specify a PSCredential object, such as one that the Get-Credential cmdlet returns, for this parameter. For more information about credential objects, type Get-Help Get-Credential.

If you specify a computer in the ComputerName parameter, use an account that has access to that computer. The default is the current user.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

Specifies the display name of the class.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassDisplayName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specifies an array of GUIDs of classes. If you specify an ID as a string, the cmdlet converts the string to a GUID.

Parameter properties

Type:

Guid[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassGuids
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Instance

Specifies an array of ClassInstance objects. To obtain a ClassInstance object, use the Get-SCOMClassInstance object.

Parameter properties

Type:

EnterpriseManagementObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromEMO
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagementPack

Specifies an array of ManagementPack objects. To obtain a ManagementPack object, use the Get-SCManagementPack cmdlet.

Parameter properties

Type:

ManagementPack[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromManagementPack
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies an array of names of classes that this cmdlet gets.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassName
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

Specifies an array of Connection objects. To get Connection objects, use the Get-SCOMManagementGroupConnection cmdlet.

If this parameter is not specified, the cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Parameter properties

Type:

Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject

You can pass an instance of a management pack to the Instance parameter of the Get-SCClass cmdlet by using the pipe operator. The Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject object is one the properties of the output object of the Get-SCOMClassinstance cmdlet.

System.Guid

You can pass a GUID to the Id parameter of the Get-SCClass cmdlets through the pipe operator.

Microsoft.EnterpriseManagement.Configuration.ManagementPackManagementPack

You can pass a management pack to the ManagementPack parameter of the Get-SCClass cmdlet through the pipe operator. This management pack object contains the class object.

System.String

You can pass a name to the Name parameter of the Get-SCClass cmdlet through the pipe operator.

Outputs

Microsoft.EnterpriseManagement.Configuration.ManagementPackClass

This cmdlet generates a management pack object.