共用方式為


Remove-SCSMAllowListClass

從 Service Manager 同步處理期間 Operations Manager CI 連接器所使用的類別允許清單中移除指定的類別。

語法

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

Description

Remove-SCSMAllowListClass Cmdlet 會從 Operations Manager CI 連接器在 Service Manager 同步處理期間所使用的類別允許列表中移除指定的類別。 如果允許清單中沒有類別名稱,Cmdlet 會傳回自變數例外狀況。

範例

範例 1:從允許清單中移除類別

PS C:\>Remove-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

第一個命令會從允許清單中移除 SoftwareItem 類別。

第二個命令會擷取允許清單,以確認類別已移除。

範例 2:嘗試移除不在清單中的專案

PS C:\>Remove-SCSMAllowListClass "System.SoftwareItem"
Remove-SCSMAllowListClass : Class System.SoftwareItem cannot be removed because it is not in the allow list.
At line:1 char:26
+ Remove-SCSMAllowListClass <<<<  "System.SoftwareItem"
    + CategoryInfo          : InvalidData: (System.SoftwareItem:String) [Remove-SCSMAllowListClass], ArgumentException
    + FullyQualifiedErrorId : Invalid allow list XML,Microsoft.EnterpriseManagement.SMCmdlets.RemoveSCSMAllowListClass

此命令會嘗試移除不在清單中的類別。

參數

-ClassName

指定此 Cmdlet 從 Operations Manager CI 連接器允許清單中移除的類別名稱。 每個類別名稱都必須存在於允許清單中,而且必須對應至 <ClassType> 管理元件專案的 ID 屬性。

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

-ComputerName

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

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

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:System.Management.Automation.SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Credential

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

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

-SCSession

指定物件,表示 Service Manager 管理伺服器的會話。

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:System.Management.Automation.SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None.

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

輸出

None.

此 Cmdlet 不會產生任何輸出。