Remove-VMNetworkAdapterExtendedAcl
Remove-VMNetworkAdapterExtendedAcl
Removes an extended ACL for a virtual network adapter.
Syntax
Parameter Set: VMName
Remove-VMNetworkAdapterExtendedAcl [-VMName] <String[]> -Direction <VMNetworkAdapterExtendedAclDirection> -Weight <Int32> [-ComputerName <String[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: InputObjectParameter
Remove-VMNetworkAdapterExtendedAcl [-InputObject] <VMNetworkAdapterExtendedAclSetting[]> [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ManagementOS
Remove-VMNetworkAdapterExtendedAcl -Direction <VMNetworkAdapterExtendedAclDirection> -ManagementOS -Weight <Int32> [-ComputerName <String[]> ] [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ResourceObject
Remove-VMNetworkAdapterExtendedAcl [-VMNetworkAdapter] <VMNetworkAdapterBase[]> -Direction <VMNetworkAdapterExtendedAclDirection> -Weight <Int32> [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMObject
Remove-VMNetworkAdapterExtendedAcl [-VM] <VirtualMachine[]> -Direction <VMNetworkAdapterExtendedAclDirection> -Weight <Int32> [-Passthru] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-VMNetworkAdapterExtendedAcl cmdlet removes an extended access control list (ACL) for a virtual network adapter.
Parameters
-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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
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. The acceptable values for this parameter are:
-- Inbound
-- Outbound
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-InputObject<VMNetworkAdapterExtendedAclSetting[]>
Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Passthru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-VMNetworkAdapterName<String>
Specifies the name of a virtual network adapter. The cmdlet removes an ACL for the network adapter that you specify.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.HyperV.PowerShell.VMNetworkAdapterExtendedAclSetting
Examples
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
Related topics
Add-VMNetworkAdapterExtendedAcl