共用方式為


Get-SCSMObjectTemplate

取得物件範本。

語法

Get-SCSMObjectTemplate
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMObjectTemplate
   [-DisplayName] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMObjectTemplate
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMObjectTemplate
   [-ManagementPack] <ManagementPack[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMObjectTemplate
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

Get-SCSMObjectTemplate Cmdlet 會擷取 Service Manager 中定義的物件範本。

範例

範例 1:取得所有物件範本

PS C:\>Get-SCSMObjectTemplate
Name                                                                     Description
----                                                                     -----------
PortalIncidentTemplate                                                   Template applied to incidents created via the portal
AssignedToUserNotificationTemplate                                       Use for notifications sent to the user who is assigned the incident
StandardChangeRequest                                                    Standard Change Requests are pre-approved and used for low-risk pre-tested cha...
DataProvider.Microsoft.EnterpriseManagement.ServiceManager.Connector.AD  Linking Framework Active Directory Data Provider class
DataConsumer.Microsoft.EnterpriseManagement.ServiceManager.Connector.Sms Linking Framework Configuration Manager Data Consumer class
AffectedUserNotificationTemplate                                         Use for notifications sent to end users
NetworkingIssueIncidentTemplate                                          Use for incidents that are for networking problems
ChangeRequestAssignedToUserNotificationTemplate                          Use for notifications sent to the user who is assigned the change request
OpsMgr.CIList.Template                                                   This template sets the base classes that control which configuration items are...
DefaultParallelActivityTemplate                                          Default Parallel Activity
SecurityReleaseChangeRequest                                             Use Security Release template for security patch scenario. It includes typical...
EscalationNotificationTemplate                                           Use for notifications sent when an incident is escalated
DataProvider.Microsoft.EnterpriseManagement.ServiceManager.Connector.Sms Linking Framework Configuration Manager Data Provider class
MinorChangeRequest                                                       Minor Change Requests can be approved by change manager. Use them for low-risk...
DefaultIncidentTemplate                                                  Use when you want to open an incident for which you do not have a specific tem...
DefaultDependentActivityTemplate                                         Default Dependent Activity
EmergencyChangeRequest                                                   Emergency Change Requests are used for urgent changes which should be implemen...
DataConsumer.Microsoft.EnterpriseManagement.ServiceManager.Connector.AD  Linking Framework Active Directory Data Consumer class
SoftwareIssueIncidentTemplate                                            Use for incidents that are for software problems
HighPriorityIncidentTemplate                                             Use for incidents that have high impact and high urgency
MajorChangeRequest                                                       Major Change Requests should be screened by Change Manager. Change Advisory Bo...
DefaultReviewActivityTemplate                                            Default Review Activity
HardwareIssueIncidentTemplate                                            Use for incidents that are for hardware problems
DefaultSequentialActivityTemplate                                        Default Sequential Activity
PrintingIssueIncidentTemplate                                            Use for incidents that are for printing problems
DefaultManualActivityTemplate                                            Default Manual Activity
Microsoft.SystemCenter.WorkItem.SCOMIncident.Template                    System Center Operations Manager incident template
DefaultReleaseRecord                                                     Default Release Record

此命令會擷取 Service Manager 中定義的所有物件範本。

範例 2:依名稱取得物件範本

PS C:\>Get-SCSMObjectTemplate -name "StandardChangeRequest"
StandardChangeRequest


Name                  Description
----                  -----------
StandardChangeRequest Standard Change Requests are pre-approved and used for low-risk pre-tested change operations.

此命令會擷取名稱為 StandardChangeRequest 的物件範本。

參數

-ComputerName

指定要建立連線的電腦。 計算機必須執行 System Center 資料存取服務。 預設值是目前管理群組連線的計算機。

有效格式包括 NetBIOS 名稱、IP 位址或完整功能變數名稱 (FQDN)。 若要指定本機計算機,請輸入計算機名稱 「localhost」或點 (.)。

類型:System.String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Credential

指定將執行管理群組連線的用戶帳戶。 如果指定伺服器,帳戶必須能夠存取 ComputerName 參數中指定的伺服器。 預設值為目前的使用者。

您可以輸入由 Get-Credential Cmdlet 所傳回 PSCredential 物件。

類型:System.Management.Automation.PSCredential
Position:Named
預設值:Current user context
必要:False
接受管線輸入:False
接受萬用字元:False

-DisplayName

指定要擷取之物件範本的顯示名稱。

類型:System.String[]
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Id

指定要擷取之物件範本的標識碼。

類型:System.Guid[]
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ManagementPack

指定要擷取之物件範本的管理元件。 您可以輸入 Get-SCSMManagementPack Cmdlet 所傳回的 ManagementPack 物件。

類型:Microsoft.EnterpriseManagement.Configuration.ManagementPack[]
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

指定要擷取的物件範本名稱。

類型:System.String[]
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-SCSession

指定與管理伺服器的連線。 預設值為目前的管理群組連線。

您可以輸入由 Get-SCSMManagementGroupConnection Cmdlet 傳回的管理群組連接物件。

類型:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

System.Guid

您可以使用管線將物件範本的 GUID 傳送至 Get-SCSMObjectTemplate Cmdlet 的 Id 參數。

Microsoft.EnterpriseManagement.Configuration.ManagementPack

您可以使用管線將管理元件物件傳送至 Get-SCSMObjectTemplate Cmdlet 的 ManagementPack 參數。

System.String

您可以使用管線將範本的名稱傳送至 Get-SCSMObjectTemplate Cmdlet 的 Name 參數。

輸出

Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate

此 Cmdlet 會擷取所有範本物件。