Remove-VMNetworkAdapterExtendedAcl

Remove-VMNetworkAdapterExtendedAcl

Removes an extended ACL for a virtual network adapter.

语法

Parameter Set: VMName
Remove-VMNetworkAdapterExtendedAcl [-VMName] <String[]> -Direction <VMNetworkAdapterExtendedAclDirection> {Inbound | Outbound} -Weight <Int32> [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObjectParameter
Remove-VMNetworkAdapterExtendedAcl [-InputObject] <VMNetworkAdapterExtendedAclSetting[]> [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ManagementOS
Remove-VMNetworkAdapterExtendedAcl -Direction <VMNetworkAdapterExtendedAclDirection> {Inbound | Outbound} -ManagementOS -Weight <Int32> [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ResourceObject
Remove-VMNetworkAdapterExtendedAcl [-VMNetworkAdapter] <VMNetworkAdapterBase[]> -Direction <VMNetworkAdapterExtendedAclDirection> {Inbound | Outbound} -Weight <Int32> [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMObject
Remove-VMNetworkAdapterExtendedAcl [-VM] <VirtualMachine[]> -Direction <VMNetworkAdapterExtendedAclDirection> {Inbound | Outbound} -Weight <Int32> [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

详细说明

The Remove-VMNetworkAdapterExtendedAcl cmdlet removes an extended access control list (ACL) for a virtual network adapter.

参数

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

在远程会话中或远程计算机上运行该 cmdlet。输入计算机名或会话对象,如 New-cimsessionGet-cimsession cmdlet 的输出。默认为本地计算机上的当前会话。

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-ComputerName<String[]>

Specifies an array of Hyper-V hosts. The cmdlet removes an ACL associated with a virtual network adapter on the Hyper-V hosts that you specify.

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-Credential<System.Management.Automation.PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-Direction<VMNetworkAdapterExtendedAclDirection>

Specifies the direction of network traffic, from the perspective of the virtual machine, to which the ACL applies. The cmdlet removes an ACL that has the value that you specify. 此参数的可接受值是:
     -- Inbound
     -- Outbound

别名

none

是否必需?

true

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-InputObject<VMNetworkAdapterExtendedAclSetting[]>

指定此 cmdlet 的输入。可以使用此参数,也可以通过管道传送此 cmdlet 的输入。

别名

none

是否必需?

true

在哪里?

1

默认值

none

是否接受管道输入?

True (ByValue, ByPropertyName)

是否接受通配符?

false

-ManagementOS

Indicates that the cmdlet operates on the parent or host operating system. If you specify this parameter, this cmdlet removes an ACL that applies in the parent or host operating system.

别名

none

是否必需?

true

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-Passthru

返回一个对象,该对象表示所使用的项。默认情况下,此 cmdlet 不生成任何输出。

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-VM<VirtualMachine[]>

Specifies an array of virtual machines as VirutalMachine objects. The cmdlet removes an ACL for network adapters that belong to the virtual machines that you specify. To obtain a virtual machine object, use the Get-VM cmdlet.

别名

none

是否必需?

true

在哪里?

1

默认值

none

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-VMName<String[]>

Specifies an array of names of virtual machines. The cmdlet removes an ACL for network adapters that belong to the virtual machines that you specify.

别名

none

是否必需?

true

在哪里?

1

默认值

none

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-VMNetworkAdapter<VMNetworkAdapterBase[]>

Specifies an array virtual machine network adapters as VMNetworkAdapterBase objects. The cmdlet removes an ACL for the network adapters that you specify. To obtain a network adapter, use the Get-VMNetworkAdapter cmdlet.

别名

none

是否必需?

true

在哪里?

1

默认值

none

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-VMNetworkAdapterName<String>

Specifies the name of a virtual network adapter. The cmdlet removes an ACL for the network adapter that you specify.

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-Weight<Int32>

Specifies the weight of an ACL entry. Because weight is unique for each entry, if you specify a value for this parameter, the cmdlet removes a specific extended ACL entry.

别名

none

是否必需?

true

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-Confirm

在运行 cmdlet 前提示你进行确认。

是否必需?

false

在哪里?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示在 cmdlet 运行时将发生的情况。该 cmdlet 不运行。

是否必需?

false

在哪里?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持常见的参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 TechNet 上的 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

输入

输入类型是可以传送到 cmdlet 的对象的类型。

  • None

输出

输出类型是 cmdlet 发出的对象的类型。

  • Microsoft.HyperV.PowerShell.VMNetworkAdapterExtendedAclSetting

示例

Example 1: Remove a specific ACL

This command removes the ACL for inbound traffic that has a weight of 50 from the virtual machine named TSQA01.

PS C:\> Remove-VMNetworkAdapterExtendedAcl -VMName "TSQA01" –Direction InBound -Weight 50

Example 2: Remove all ACLs

This command uses the Get-VMNetworkAdapterExtendedAcl cmdlet to get all the ACLs for the virtual machine named TSQA01, and then passes them to the current cmdlet by using the pipeline operator. The command removes all the ACLs.

PS C:\> Get-VMNetworkAdapterExtendedAcl -VMName "TSQA01" | Remove-VMNetworkAdapterExtendedAcl

相关主题

Add-VMNetworkAdapterExtendedAcl

Get-VMNetworkAdapterExtendedAcl

Get-VM

Get-VMNetworkAdapter