Get-SCSMEmailTemplate
检索 Service Manager 中定义的电子邮件模板。
语法
Get-SCSMEmailTemplate
[-Description <String>]
[[-DisplayName] <String>]
[-ManagementPack <ManagementPack>]
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
说明
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 Data Access 服务的计算机的名称。 Credential 参数中指定的用户帐户必须具有对指定计算机的访问权限。
类型: | System.String[] |
Position: | Named |
默认值: | Localhost |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Credential
指定此 cmdlet 用于连接到运行 System Center Data Access 服务的服务器的凭据。 指定的用户帐户必须有权访问该服务器。
类型: | 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 返回电子邮件模板对象。