Get-SCClass

Gets classes in Operations Manager.

Syntax

Get-SCClass [-DisplayName] <String[]> [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]
Get-SCClass [-Id] <Guid[]> [-ComputerName <String[]>] [-Credential <PSCredential>] [-SCSession <Connection[]>]
 [<CommonParameters>]
Get-SCClass [-Instance] <EnterpriseManagementObject[]> [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]
Get-SCClass [-ManagementPack] <ManagementPack[]> [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]
Get-SCClass [-Name] <String[]> [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]

Description

The Get-SCClass cmdlet gets one or more classes defined by System Center 2016 Operations Manager or an imported management pack.

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.

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.

Type:String[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the display name of the class.

Type:String[]
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Instance

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

Type:EnterpriseManagementObject[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ManagementPack

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

Type:ManagementPack[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

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

Type:String[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters: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.

Type:Connection[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

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.

Inputs

System.Guid

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

Inputs

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.

Inputs

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.