Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Set-NetNat can't set any parameters on Windows 10 Version 1607


View products that this article applies to.

Symptoms

Assume that you're building a new platform on Windows 10 Enterprise 2016 LTSB (Build 14393) that has Hyper-V installed. As part of a project to roll out this new platform, you have a virtual machine running inside of Hyper-V. This virtual machine is on a private virtual switch using NAT configuration. 
 
You use SSH to connect to servers in the virtual machine and leave the SSH sessions idle. In this situation, the sessions will disconnect from the servers.
 
This issue does not occur in the following scenario:
 
  • You use the SSH to connect to servers outside the virtual machine and leave the sessions idle.
  • You use SSH to connect to servers in the virtual machine, and the virtual machine is not on a private virtual switch using NAT configuration.
When you run the PowerShell command Set-NetNat -Name test -TcpEstablishedConnectionTimeout 0 on a Windows 10 Version 1607-based computer that has NAT configured, you may receive the following error message:
"Set-NetNat: : Property ExternalIpInterfaceAddressPrefix is read-only
At line:1 char:1
+ Set-NetNat -Name test -TcpEstablishedConnectionTimeout 0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+ Category Info : InvalidArgument: (MSFT_NetNat (InstanceID = "test;0"):root/StandardCimv2/MSFT_NetNat [Set-NetNat], CimException 
+ FullyQualifiedErrorId : Windows System Error 87,Set-NetNat
 

↑ Back to the top


Cause

This issue occurs because Set-NetNat is broken due to improperly organized parameter validation. This leads to it fail on parameters that you never specified.

↑ Back to the top


Workaround

This issue is fixed on Windows 10 Version 1703.
 
To work around this issue on Windows 10 Version 1607 and on Windows 10 Enterprise 2016 LTSB, set corresponding NSI values for TcpEstablishedConnectionTimeout in the registry.

↑ Back to the top


Keywords: kbbug, kbexpertiseadvanced, kbsurveynew

↑ Back to the top

Article Info
Article ID : 4016962
Revision : 15
Created on : 9/30/2018
Published on : 10/2/2018
Exists online : False
Views : 431