Get-SCClass

Gets classes in Operations Manager.

Syntax

Get-SCClass
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCClass
   [-DisplayName] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCClass
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCClass
   [-Instance] <EnterpriseManagementObject[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCClass
   [-ManagementPack] <ManagementPack[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCClass
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<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.

Required Parameters

-DisplayName

Specifies the display name of the class.

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

Optional 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[]
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
Position:Named
Default value:None
Accept pipeline input:False
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[]
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.