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