PowerShell Logo Small

Add-NetNatStaticMapping



This is the built-in help made by Microsoft for the command 'Add-NetNatStaticMapping', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' 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

Adds a static mapping to a NAT instance.

SYNTAX


Add-NetNatStaticMapping [-NatName] <String> [-AsJob] [-CimSession <CimSession[]>] [-InternalPort <UInt16>] [-InternalRoutingDomainId <String>] [-RemoteExternalIPAddre
ssPrefix <String>] [-ThrottleLimit <Int32>] -ExternalIPAddress <String> -ExternalPort <UInt16> -InternalIPAddress <String> -Protocol <Protocol> [-Confirm] [-WhatIf] [
<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-NetNatStaticMapping cmdlet adds a static mapping to a network address translation (NAT) instance. A static mapping enables an incoming connection from an exte
rnal network to access a host on an internal network through the NAT.


You can use NAT to share a connection to the public Internet through a single interface with a single public IP address. The computers on the private network use priv
ate, non-routable addresses. NAT maps the private addresses to the public address.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=294369
Get-NetNatStaticMapping
Remove-NetNatStaticMapping

REMARKS

<

Examples


Example 1: Add a static mapping to a NAT instance

PS C:\> Add-NetNatStaticMapping -ExternalIPAddress "a.b.c.0/24" -ExternalPort 80 -InternalIPAddress "192.0.02.179" -InternalPort 8080 -InternalRoutingDomainId "{12345
678-0000-0000-0000-123456789012}"



This command adds a static mapping to a NAT instance. The command specifies that NAT maps the external IP address to the internal IP address 192.0.02.179. The command
specifies that the NAT maps the destination port 80 of the Internet resource to the source application port 8080. The command specifies that the tenant compartment t
hat has the ID TSQATenant contains the internal address and internal port. This example uses the placeholder a.b.c.0/24 to represent a public Internet address prefix.