Get-SCSMObjectTemplate

Get-SCSMObjectTemplate

Gets an object template.

Syntax

Parameter Set: Empty
Get-SCSMObjectTemplate [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromClassDisplayName
Get-SCSMObjectTemplate [-DisplayName] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromClassGuids
Get-SCSMObjectTemplate [-Id] <Guid[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromClassName
Get-SCSMObjectTemplate [-Name] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementPack
Get-SCSMObjectTemplate [-ManagementPack] <ManagementPack[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Detailed Description

The Get-SCSMObjectTemplate cmdlet retrieves an object template that is defined in Service Manager.

Parameters

-ComputerName<String[]>

Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified. The default value is the current user.

You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

Current user context

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-DisplayName<String[]>

Specifies the display name of the object template to retrieve.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<Guid[]>

Specifies the ID of the object template to retrieve.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagementPack<ManagementPack[]>

Specifies the management pack containing the object templates to retrieve. You can enter a ManagementPack object that is returned by the Get-SCSMManagementPack cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies the Name of the object template to retrieve.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies a connection to a management server. The default value is the current management group connection.

You can enter a management group connection object that is returned by the Get-SCSMManagementGroupConnection cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.Guid

    You can pipe a GUID of an object template to the Id parameter of the Get-SCSMObjectTemplate cmdlet.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPack

    You can pipe a management pack object to the ManagementPack parameter of the Get-SCSMObjectTemplate cmdlet.

  • System.String

    You can pipe a name of a template to the Name parameter of the Get-SCSMObjectTemplate cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate

    This cmdlet retrieves all template objects.

Examples

Example 1: Get all object templates

This command retrieves all object templates that are defined in Service Manager.

PS C:\>Get-SCSMObjectTemplate

Example 2: Get object templates by name

This command retrieves the object template with the name StandardChangeRequest.

PS C:\>Get-SCSMObjectTemplate –name "StandardChangeRequest"

Service Manager Administrator Cmdlets Group 1