次の方法で共有


Get-SCSMEmailTemplate

Service Managerで定義されている電子メール テンプレートを取得します。

構文

Get-SCSMEmailTemplate
   [-Description <String>]
   [[-DisplayName] <String>]
   [-ManagementPack <ManagementPack>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

説明

Get-SCSMEmailTemplate コマンドレットは、Service Managerで定義されている電子メール テンプレートを取得します。 返されるオブジェクトの型は ManagementPackObjectTemplate です。 このコマンドレットは、 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 パラメーターで指定されたユーザー アカウントには、指定されたコンピューターへのアクセス権が必要です。

Type:System.String[]
Position:Named
Default value:Localhost
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

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.

パイプを使用してこのコマンドレットに入力を渡すことはできません。

出力

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate

このコマンドレットは、電子メール テンプレート オブジェクトを返します。