Add-SCSMAllowListClass

將指定的類別加入至 Service Manager Operations Manager CI 連接器在同步處理期間所用的類別允許清單。

Syntax

Add-SCSMAllowListClass
   [-ClassName] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Add-SCSMAllowListClass Cmdlet 會將指定的類別新增至同步處理期間Service Manager Operations Manager CI Connector 所使用的類別允許清單。 指定的類別必須已在現有管理組件中加以定義。

範例

範例 1:將類別新增至允許清單

PS C:\>Add-SCSMAllowListClass System.SoftwareItem

PS C:\>Get-SCSMAllowList
name                                                        mp
----                                                        --
System.Service                                              System.Library
System.Database                                             System.Library
Microsoft.Windows.ApplicationComponent                      Microsoft.Windows.Library
Microsoft.Windows.ComputerRole                              Microsoft.Windows.Library
System.Computer                                             System.Library
System.OperatingSystem                                      System.Library
Microsoft.Windows.LogicalDevice                             Microsoft.Windows.Library
System.SoftwareInstallation                                 System.Library
System.WebSite                                              System.Library
System.SoftwareItem                                         System.Software.Library

此範例會將類別加入至允許清單。 第一個指令程式會將 SoftwareItem 類別加入至允許清單。 第二個指令程式會擷取允許清單以確認新增。

範例 2:新增不正確類別名稱

PS C:\>Add-SCSMAllowListClass -ClassName "Config"
[CODE_Snippit]Add-SCSMAllowListClass[CODE_Snippit]: The management pack class Config could not be found. Did you mean: 
System.ConfigItem
System.Search.ProviderConfig
System.Announcement.Config
System.GroomingConfiguration
Microsoft.SystemCenter.ConfigureWorkflowTarget
Microsoft.SystemCenter.ConfigItemGroup
Microsoft.SystemCenter.ConfigurationManager.AICatalog
Microsoft.SystemCenter.ConfigurationManager.CollectionInfo
Microsoft.SystemCenter.ConfigurationManager.DCM_CI
Microsoft.SystemCenter.ConfigurationManager.DCM_NonCompliance_CI
Microsoft.SystemCenter.ConfigurationManager.DeployedComputer
Microsoft.SystemCenter.ConfigurationManager.Package
Microsoft.SystemCenter.ConfigurationManager.Program
System.Notification.ConfigurationSource
System.Notification.SIPConfigurationSource
System.Notification.SMTPConfigurationSource
Microsoft.SystemCenter.LinkingFramework.Configuration.CmdbSyncRuleTarget
System.LinkingFramework.SccmSource
Microsoft.EnterpriseManagement.LinkingFramework.OpsMgrConnector.Config
Microsoft.EnterpriseManagement.LinkingFramework.OpsMgrConnector.OpsMgrCIs
System.InboundEmail.Configuration
Microsoft.SystemCenter.ServiceManager.InboundEmail.Configuration.WorkflowTarget
System.WorkItem.Activity.WorkflowTarget
System.WorkItem.ChangeRequest.WorkflowTarget
Microsoft.SystemCenter.WorkItem.DCMIncident
System.WorkItem.Incident.Wizard.AutomaticChangeIncident
System.WorkItem.Incident.Wizard.DCMIntegration
Microsoft.SystemCenter.ServiceManager.Portal.Links.Configuration
ServiceManager.SoftwareDeployment.SCCM.Configuration
? 
At line:1 char:23
+ Add-SCSMAllowListClass <<<<  -ClassName Config
    + CategoryInfo          : InvalidData: (Config:String) [Add-SCSMAllowListClass], ArgumentException
    + FullyQualifiedErrorId : Invalid allow list XML,Microsoft.EnterpriseManagement.SMCmdlets.AddSCSMAllowListClass

此命令會嘗試將類別新增至允許清單。 不過,Config 不是 ClassName 參數的有效值。

參數

-ClassName

指定要新增至設定專案 Operations Manager CI 連接器允許清單的類別名稱。 每個類別名稱都必須對應至現有 < ClassType > 管理元件專案的 ID 屬性。 請以逗號分隔多個類別名稱。

Type:System.String[]
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

指定 System Center 資料存取服務執行所在的電腦名稱。 Credential參數中指定的使用者帳戶必須具有指定電腦的存取權限。

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

-Confirm

在執行 Cmdlet 前提示您確認。

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

指定此 Cmdlet 用來連線到 System Center 資料存取服務執行所在伺服器的認證。 指定的使用者帳戶必須具有該伺服器的存取權限。

Type:System.Management.Automation.PSCredential
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

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 Cmdlet 並不會執行。

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

輸入

None.

您無法使用管線傳送輸入至此 Cmdlet。

輸出

None.

此 Cmdlet 不會產生任何輸出。