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 参数中指定的用户帐户必须具有对指定计算机的访问权限。
Type: | System.String[] |
Position: | Named |
Default value: | Localhost |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
指定此 cmdlet 用于连接到运行 System Center Data Access 服务的服务器的凭据。 指定用户帐户必须具有对该服务器的访问权限。
Type: | System.Management.Automation.PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定要检索的电子邮件模板的说明。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
指定要检索的电子邮件模板的显示名称。
Type: | System.String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManagementPack
指定要在其中定义要检索的电子邮件模板的管理包。
Type: | Microsoft.EnterpriseManagement.Configuration.ManagementPack |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SCSession
指定表示与 Service Manager 管理服务器的会话的对象。
Type: | Microsoft.SystemCenter.Core.Connection.Connection[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
None.
不能通过管道将输入传递给此 cmdlet。
输出
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate
此 cmdlet 返回电子邮件模板对象。