Get-SCSMEmailTemplate
Get-SCSMEmailTemplate
Retrieves email templates that are defined in Service Manager.
Sintaxis
Parameter Set: Default
Get-SCSMEmailTemplate [[-DisplayName] <String> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-ManagementPack <ManagementPack> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Descripción detallada
The Get-SCSMEmailTemplate cmdlet retrieves email templates that are defined in Service Manager. The type of the returned object is ManagementPackObjectTemplate, and only objects of the class SMTP are returned.
Parámetros
-ComputerName<String[]>
Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
localhost |
¿Aceptar canalización? |
true (ByValue) |
¿Aceptar caracteres comodín? |
false |
-Credential<PSCredential>
Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByValue) |
¿Aceptar caracteres comodín? |
false |
-Description<String>
Specifies the description of the email template to retrieve.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-DisplayName<String>
Specifies the display name of the email template to retrieve.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ManagementPack<ManagementPack>
Specifies the management packs in which email templates to retrieve are defined.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-SCSession<Connection[]>
Specifies an object that represents the session to a Service Manager management server.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByValue) |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
None.
You cannot pipe input to this cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.EmailTemplate
This cmdlet returns email template objects.
Ejemplos
Example 1: Get all templates
This command retrieves all email templates from Service Manager.
C:\PS>Get-SCSMEmailTemplate
Example 2: Display names and targeted classes
This command retrieves the email templates, and passes them to the Format-Table cmdlet. That cmdlet displays the display name and the targeted class for the templates. The results could be passed to the New-SCSMSubscription cmdlet.
C:\PS>Get-SCSMEmailTemplate | Format-Table -Property DisplayName,TargetClass -AutoScale