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>]

说明

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 Data Access 服务。 默认值是用于当前管理组连接的计算机。

有效格式包括 NetBIOS 名称、IP 地址或完全限定的域名 (FQDN)。 若要指定本地计算机,请键入该计算机名称、“localhost”或句点 (.)。

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Credential

指定用于运行管理组连接的用户帐户。 如果指定了服务器,则帐户必须有权访问 ComputerName 参数中指定的服务器。 默认值为当前用户。

可以输入 Get-Credential cmdlet 返回的 PSCredential 对象。

Type:PSCredential
Position:Named
Default value:Current user context
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

指定要检索的对象模板的显示名称。

Type:String[]
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Id

指定要检索的对象模板的 ID。

Type:Guid[]
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-ManagementPack

指定包含要检索的对象模板的管理包。 可以输入 Get-SCSMManagementPack cmdlet 返回的 ManagementPack 对象。

Type:ManagementPack[]
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-Name

指定要检索的对象模板的名称。

Type:String[]
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-SCSession

指定与管理服务器的连接。 默认值是当前管理组连接。

可以输入由 Get-SCSMManagementGroupConnection cmdlet 返回的管理组连接对象。

Type:Connection[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

输入

System.Guid

可以通过管道将对象模板的 GUID 传递给 Get-SCSMObjectTemplate cmdlet 的 ID 参数。

Microsoft.EnterpriseManagement.Configuration.ManagementPack

可以通过管道将管理包对象传递给 Get-SCSMObjectTemplate cmdlet 的 ManagementPack 参数。

System.String

可以通过管道将模板的名称传递给 Get-SCSMObjectTemplate cmdlet 的名称参数。

输出

Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate

此 cmdlet 检索所有模板对象。