Get-SCSMEmailTemplateContent
Retrieves the content of Service Manager email templates.
Syntax
Default (Default)
Get-SCSMEmailTemplateContent
[-EmailTemplate] <EmailTemplate[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Get-SCSMEmailTemplateContent cmdlet retrieves the content of Service Manager email templates.
Examples
Example 1: Display template contents
C:\PS>Get-SCSMEmailTemplateContent -EmailTemplate (Get-SCObjectTemplate -Name AssignedToUserNotificationTemplate) | Where-Object {$_.language -eq "en"}
Language Subject Body
-------- ------- ----
en Incident assigned: $Context/Pr Dear $Context/Path[Relationship='WorkItem!System.WorkItemAsP
operty[Type='WorkItem!System.W ignedToUser' SeedRole='Source' TypeConstraint='System!System
orkItem']/Id$ .Domain.User']/Property[Type='System!System.Domain.User']/Fi
rstName$,
The following incident has been assigned to you:
Incident ID: $Context/Property[Type='WorkItem!System.WorkIte
m']/Id$
Target Resolution Time: $Context/Property[Type='CoreIncident
!System.WorkItem.Incident']/TargetResolutionTime$
Priority: $Context/Property[Type='WorkItem!System.WorkItem.T
roubleTicket']/Priority$
Affected User: $Context/Path[Relationship='WorkItem!System.W
orkItemAffectedUser' SeedRole='Source' TypeConstraint='Syste
m!System.Domain.User']/Property[Type='System!System.Domain.U
ser']/UserName$
Category: $Context/Property[Type='CoreIncident!System.WorkIt
em.Incident']/Classification$
This is an automated e-mail generated by System Center Servi
ce Manager.
This command retrieves the content of the AssignedToUserNotificationTemplate template, and then displays the English version of that content.
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.
Parameter properties
Type: | System.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 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.
Parameter properties
Type: | System.Management.Automation.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 |
-EmailTemplate
Specifies an instance of a ManagementPackObjectTemplate for which to retrieve content.
Parameter properties
Type: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SCSession
Specifies an object that represents a session to a Service Manager management server.
Parameter properties
Type: | Microsoft.SystemCenter.Core.Connection.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.ServiceManager.Sdk.Notifications.EmailTemplate
You can pipe an email template to the EmailTemplate parameter. You can obtain an EmailTemplate by using the Get-SCSMEmailTemplate cmdlet.