PowerShell Logo Small

Add-VMNetworkAdapterExtendedAcl



This is the built-in help made by Microsoft for the command 'Add-VMNetworkAdapterExtendedAcl', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates an extended ACL for a virtual network adapter.

SYNTAX


Add-VMNetworkAdapterExtendedAcl [-VMName] <String[]> [-Action] <VMNetworkAdapterExtendedAclAction> [-Direction] <VMNetworkAdapterExtendedAclDirection> [[-LocalIPAddress]
<String>] [[-RemoteIPAddress] <String>] [[-LocalPort] <String>] [[-RemotePort] <String>] [[-Protocol] <String>] [-Weight] <Int32> [-ComputerName <String[]>]
[-IdleSessionTimeout <Int32>] [-IsolationID <Int32>] [-Passthru] [-Stateful <Boolean>] [-VMNetworkAdapterName <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-VMNetworkAdapterExtendedAcl [-Action] <VMNetworkAdapterExtendedAclAction> [-Direction] <VMNetworkAdapterExtendedAclDirection> [[-LocalIPAddress] <String>]
[[-RemoteIPAddress] <String>] [[-LocalPort] <String>] [[-RemotePort] <String>] [[-Protocol] <String>] [-Weight] <Int32> [-ComputerName <String[]>] [-IdleSessionTimeout
<Int32>] [-IsolationID <Int32>] [-Passthru] [-Stateful <Boolean>] [-VMNetworkAdapterName <String>] -ManagementOS [-Confirm] [-WhatIf] [<CommonParameters>]
Add-VMNetworkAdapterExtendedAcl [-VM] <VirtualMachine[]> [-Action] <VMNetworkAdapterExtendedAclAction> [-Direction] <VMNetworkAdapterExtendedAclDirection> [[-LocalIPAddress]
<String>] [[-RemoteIPAddress] <String>] [[-LocalPort] <String>] [[-RemotePort] <String>] [[-Protocol] <String>] [-Weight] <Int32> [-IdleSessionTimeout <Int32>] [-IsolationID
<Int32>] [-Passthru] [-Stateful <Boolean>] [-VMNetworkAdapterName <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-VMNetworkAdapterExtendedAcl [-VMNetworkAdapter] <VMNetworkAdapterBase[]> [-Action] <VMNetworkAdapterExtendedAclAction> [-Direction]
<VMNetworkAdapterExtendedAclDirection> [[-LocalIPAddress] <String>] [[-RemoteIPAddress] <String>] [[-LocalPort] <String>] [[-RemotePort] <String>] [[-Protocol] <String>]
[-Weight] <Int32> [-IdleSessionTimeout <Int32>] [-IsolationID <Int32>] [-Passthru] [-Stateful <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-VMNetworkAdapterExtendedAcl cmdlet creates an extended access control list (ACL) for a virtual network adapter. The ACL allows or denies access to a virtual machine
network adapter for network packets based on source IP address, destination IP address, protocol, source port, and destination port.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=294118
Get-VMNetworkAdapterExtendedAcl
Remove-VMNetworkAdapterExtendedAcl
Get-VM
Set-VmNetworkAdapterIsolation

REMARKS

<

Examples


Example 1: Create an ACL for Remote Desktop Protocol

PS C:\> Add-VMNetworkAdapterExtendedAcl -VMName "TSQA01" -Action Allow -Direction Inbound -LocalPort "3389" -Protocol "TCP" -Weight 10 -Stateful $True



This command creates a stateful inbound ACL that allows a remote device to connect to the virtual machine on port 3389, which is the port for Remote Desktop Protocol.




Example 2: Create an ACL to initiate a connection with timeout

PS C:\> Add-VMNetworkAdapterExtendedAcl -VMName "TSQA03" -Action Allow -Direction Outbound -RemotePort "80" -Protocol "TCP" -Weight 100 -Timeout 3600 -Stateful $True



This command creates a stateful ACL that allows outbound packets to a remote device by using TCP. If there is no activity for 3600 seconds, the connection times out.