Get-SCSMEmailTemplateContent
擷取 Service Manager 電子郵件範本的內容。
語法
Get-SCSMEmailTemplateContent
[-EmailTemplate] <EmailTemplate[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
Get-SCSMEmailTemplateContent Cmdlet 會擷取 Service Manager 電子郵件範本的內容。
範例
範例 1:顯示範本內容
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.
此命令會擷取 AssignedToUserNotificationTemplate 範本的內容,然後顯示該內容的英文版本。
參數
-ComputerName
指定 System Center 資料存取服務執行所在的電腦名稱。 Credential 參數中指定的使用者帳戶必須具有指定計算機的訪問許可權。
類型: | System.String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Credential
指定此 Cmdlet 用來連線到 System Center 資料存取服務執行所在的伺服器認證。 指定的使用者帳戶必須具有該伺服器的訪問許可權。
類型: | System.Management.Automation.PSCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EmailTemplate
指定要擷取內容的 ManagementPackObjectTemplate 實例。
類型: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate[] |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-SCSession
指定物件,表示 Service Manager 管理伺服器的會話。
類型: | Microsoft.SystemCenter.Core.Connection.Connection[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate
您可以使用管線將電子郵件範本傳送至 EmailTemplate 參數。 您可以使用 Get-SCSMEmailTemplate Cmdlet 來取得 EmailTemplate。
輸出
ManagementPackElement