Remove-VMNetworkAdapterAcl

Removes an ACL applied to the traffic through a virtual network adapter.

Syntax

Remove-VMNetworkAdapterAcl
      [-VMName] <String[]>
      [-ComputerName <String[]>]
      [-LocalIPAddress <String[]>]
      [-LocalMacAddress <String[]>]
      [-Passthru]
      [-RemoteIPAddress <String[]>]
      [-RemoteMacAddress <String[]>]
      [-VMNetworkAdapterName <String>]
      -Action <VMNetworkAdapterAclAction>
      -Direction <VMNetworkAdapterAclDirection>
      [-Confirm]
      [-WhatIf]
Remove-VMNetworkAdapterAcl
      [-ComputerName <String[]>]
      [-LocalIPAddress <String[]>]
      [-LocalMacAddress <String[]>]
      [-Passthru]
      [-RemoteIPAddress <String[]>]
      [-RemoteMacAddress <String[]>]
      [-VMNetworkAdapterName <String>]
      -Action <VMNetworkAdapterAclAction>
      -Direction <VMNetworkAdapterAclDirection>
      [-ManagementOS]
      [-Confirm]
      [-WhatIf]
Remove-VMNetworkAdapterAcl
      [-VM] <VirtualMachine[]>
      [-LocalIPAddress <String[]>]
      [-LocalMacAddress <String[]>]
      [-Passthru]
      [-RemoteIPAddress <String[]>]
      [-RemoteMacAddress <String[]>]
      [-VMNetworkAdapterName <String>]
      -Action <VMNetworkAdapterAclAction>
      -Direction <VMNetworkAdapterAclDirection>
      [-Confirm]
      [-WhatIf]
Remove-VMNetworkAdapterAcl
      [-VMNetworkAdapter] <VMNetworkAdapterBase[]>
      [-LocalIPAddress <String[]>]
      [-LocalMacAddress <String[]>]
      [-Passthru]
      [-RemoteIPAddress <String[]>]
      [-RemoteMacAddress <String[]>]
      -Action <VMNetworkAdapterAclAction>
      -Direction <VMNetworkAdapterAclDirection>
      [-Confirm]
      [-WhatIf]
Remove-VMNetworkAdapterAcl
      [-InputObject] <VMNetworkAdapterAclSetting[]>
      [-Passthru]
      [-Confirm]
      [-WhatIf]

Description

The Remove-VMNetworkAdapterAcl cmdlet removes an ACL applied to the traffic through a virtual network adapter.

Examples

Example 1

PS C:\>Remove-VMNetworkAdapterAcl -VMName Redmond -RemoteIPAddress 0.0.0.0/0 -Direction Both -Action Allow

Removes from virtual machine Redmond the ACL allowing any IPv4 traffic sent from or to the virtual machine.

Example 2

PS C:\>Remove-VMNetworkAdapterAcl -VMName Redmond -RemoteIPAddress ::/0 -Direction Both -Action Allow

Removes from virtual machine Redmond the ACL that allows any IPv6 traffic sent from and to the virtual machine.

Example 3

PS C:\>Remove-VMNetworkAdapterAcl -VMName Redmond -RemoteMacAddress 03-0f-01-0e-aa-b2 -Direction Both -Action Deny

Removes the MAC ACL to prevent virtual machine Redmond from sending traffic to or receiving traffic from a remote device with MAC address 03-0f-01-0e-aa-b2.

Example 4

PS C:\>Get-VMNetworkAdapterAcl -VMName Redmond | Remove-VMNetworkAdapterAcl

Retrieves all the port ACLs configured for virtual machine Redmond and pipelines them to Remove-VMNetworkAdapterAcl, which removes all of them from the virtual machine.

Required Parameters

-Action

Specifies the action of the ACL to be removed. Allowed values are Allow, Deny, and Meter.

Type:VMNetworkAdapterAclAction
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Direction

The direction of the network traffic (from the perspective of the virtual machine) to which the ACL applies. Allowed values are Inbound, Outbound, or Both.

Type:VMNetworkAdapterAclDirection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the ACL to be removed.

Type:VMNetworkAdapterAclSetting[]
Position:1
Default value:None
Accept pipeline input:True (ByValue, ByPropertyName)
Accept wildcard characters:False
-ManagementOS

Specifies that the ACL is to be removed from the management (e.g. the parent, or host) operating system.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VM

Specifies the virtual machine from which the ACL is to be removed.

Type:VirtualMachine[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMName

Specifies the name of the virtual machine from which the ACL is to be removed.

Type:String[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMNetworkAdapter

Specifies the virtual machine network adapter from which ACL is to be removed.

Type:VMNetworkAdapterBase[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-ComputerName

Specifies one or more Hyper-V hosts on which the ACL applied to a virtual machine network adapter is to be removed. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer - use "localhost" or a dot (".") to specify the local computer explicitly.

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

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-LocalIPAddress

Specifies the local IP address. It can be either IPv4 or IPv6 address. It can be either a host address or a subnet address, e.g. 1.2.3.4, 2001::2008, 192.168.1.0/24, or f001:f002:f003:f004::1/64.the IP address can also be a wildcard, 0.0.0.0/0 for all IPv4 addresses, ::/0 for all IPv6 addresses, or ANY for all IPv4 and IPv6 addresses.

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

Specifies the local MAC address (e.g. 00-ab-00-11-22-33). Use the wildcard ANY to specify all MAC addresses.

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

Specifies that a Microsoft.Virtualization.Powershell.VMNetworkAdapterAclSetting object is to be passed through to the pipeline representing the ACL to be removed.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoteIPAddress

Specifies the remote IP address. . It can be either IPv4 or IPv6 address. It can be either a host address or a subnet address, e.g. 1.2.3.4, 2001::2008, 192.168.1.0/24, or f001:f002:f003:f004::1/64. the IP address can also be a wildcard, 0.0.0.0/0 for all IPv4 addresses, ::/0 for all IPv6 addresses, or ANY for all IPv4 and IPv6 addresses.

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

Specifies the remote MAC address. . It can be a host MAC address, e.g. 00-ab-00-11-22-33, or a wildcard, ANY, for all MAC addresses.

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

Specifies the name of the virtual machine network adapter from which the ACL is to be removed.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

None by default, Microsoft.Virtualization.Powershell.VMNetworkAdapterAclSetting if -PassThru is specified.