Remove-SCSMAllowListClass
从 Operations Manager CI 连接器在 Service Manager 中进行同步期间使用的类的允许列表中删除指定类。
语法
Remove-SCSMAllowListClass
[-ClassName] <String[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
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 属性。
Type: | System.String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ComputerName
指定运行 System Center Data Access 服务的计算机的名称。 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 Data Access 服务的服务器的凭据。 指定用户帐户必须具有对该服务器的访问权限。
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 将不生成任何输出。