Set-PncDynamicPortRange

1.0

Servers running the Microsoft Entra Private Network Connector service (WAPCSvc) may exhaust the default Windows
dynamic port range under heavy load, resulting in failed connections. This script expands the dynamic port range
for both TCP and UDP over IPv4 and IPv6 to ports 10000-65535, increasing the number of available ephemeral ports.

The script first validates tha
Servers running the Microsoft Entra Private Network Connector service (WAPCSvc) may exhaust the default Windows
dynamic port range under heavy load, resulting in failed connections. This script expands the dynamic port range
for both TCP and UDP over IPv4 and IPv6 to ports 10000-65535, increasing the number of available ephemeral ports.

The script first validates that the Entra Private Network Connector service is present and running and makes no
changes otherwise. A server restart is required for the changes to take effect.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Set-PncDynamicPortRange

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Copyright (C) 2026 Richard M. Hicks Consulting, Inc. All Rights Reserved.

Package Details

Author(s)

  • Richard Hicks

Tags

Entra PrivateNetworkConnector PrivateAccess GlobalSecureAccess DynamicPortRange ZTNA ZeroTrust TCP UDP IPv4 IPv6

Dependencies

This script has no dependencies.

FileList

Version History

Version Downloads Last updated
1.0 (current version) 4 7/28/2026