Get-SCSMEmailTemplate

Retrieves email templates that are defined in Service Manager.

Syntax

Get-SCSMEmailTemplate
   [-Description <String>]
   [[-DisplayName] <String>]
   [-ManagementPack <ManagementPack>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCSMEmailTemplate cmdlet retrieves email templates that are defined in Service Manager. The type of the returned object is ManagementPackObjectTemplate. This cmdlet returns only objects of the class SMTP.

Examples

Example 1: Get all templates

C:\PS>Get-SCSMEmailTemplate
DisplayName          Description          ManagementPack       TimeAdded            LastModified
-----------          -----------          --------------       ---------            ------------
Assigned To User Not Use for notification Service Manager Inci 12/2/2010 12:22:15 A 12/3/2010 12:56:15 A
ification Template   s sent to the user w dent Management Conf M                    M

                     ho is assigned the i iguration Library
                     ncident
End User Notificatio Use for notification Service Manager Inci 12/2/2010 12:22:15 A 12/3/2010 12:01:50 A
n Template           s sent to end users  dent Management Conf M                    M
                                          iguration Library
Assigned To User Not Use for notification Service Manager Chan 12/2/2010 12:21:55 A 12/2/2010 12:21:55 A
ification Template   s sent to the user w ge Management Config M                    M
                     ho is assigned the c uration Library
                     hange request
Escalation Notificat Use for notification Service Manager Inci 12/2/2010 12:22:15 A 12/3/2010 12:01:50 A
ion Template         s sent when an incid dent Management Conf M                    M
                     ent is escalated     iguration Library

This command retrieves all email templates from Service Manager.

Example 2: Display names and targeted classes

C:\PS>Get-SCSMEmailTemplate|format-table DisplayName,Description -au
DisplayName                            Description
-----------                            -----------
Assigned To User Notification Template Use for notifications sent to the user who is assigned the incident
End User Notification Template         Use for notifications sent to end users
Assigned To User Notification Template Use for notifications sent to the user who is assigned the change request
Escalation Notification Template       Use for notifications sent when an incident is escalated

This command retrieves and then displays the DisplayName and the Description properties of Email templates from Service Manager.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:System.String[]
Position:Named
Default value:Localhost
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies the description of the email template to retrieve.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of the email template to retrieve.

Type:System.String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ManagementPack

Specifies the management packs in which email templates to retrieve are defined.

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPack
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

Specifies an object that represents the session to a Service Manager management server.

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

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate

This cmdlet returns email template objects.