New-GSADomainControllerApp
1.1
For each domain controller, the script publishes its FQDN and the IPv4 address rep
For each domain controller, the script publishes its FQDN and the IPv4 address reported by Active Directory. Each destination gets one TCP segment and one UDP segment carrying the ports Microsoft lists for domain controllers:
- TCP: 88, 135, 389, 445, 464, 636, 3268, 3269, 49152-65535
- UDP: 88, 123, 135, 389, 445, 464, 49152-65535
GSA does not support IPv6, so IPv6 addresses are never published.
The application is an infrastructure service, so the script hides it from users (My Apps and the Microsoft 365 app launcher) and requires assignment. The script does not assign any users or groups. Review the application in the Entra admin center and assign synchronized users or groups when approved.
By default, the application is bound to the default connector group, even if the group has no active connectors. The script finds the default group by its isDefault property, so it is found even if it was renamed. If the default group has no active connectors, the script warns that the application must be reassigned to the connector group for the domain controllers' AD site when that group is ready. If the default group has active connectors, the summary notes that best practice is to use the default group only for staging. Use -ConnectorGroupName to bind the application to another group instead.
Use -EnableDeviceAccess to turn on 'Enable Device Access with Global Secure Access' for the application. Device Access lets Microsoft Entra joined and hybrid joined Windows devices reach the domain controllers before a user signs in. After the script runs, add the application to a Device Access profile and assign the profile to devices. Device Access is in preview.
Microsoft recommends publishing only the domain controllers in the Active Directory site where the Private Access connectors are installed. By default, you supply those domain controllers with -DomainController. Use -AllDomainControllers to publish every domain controller in the forest instead.
If an application with the same name exists, the script stops unless -UpdateExisting is specified. With -UpdateExisting, the script adds missing segments, reports segments that differ or are not part of this run, and never deletes anything. It never moves the application to another connector group, and it keeps an administrator's changes to the hidden and assignment required settings unless -ResetAppSettings is specified. Rerun with -UpdateExisting to finish an application after a partial failure.
Installation Options
Owners
Copyright
Copyright (C) 2026 Richard M. Hicks Consulting, Inc. All Rights Reserved.
Package Details
Author(s)
- Richard Hicks
Tags
Entra PrivateAccess GlobalSecureAccess GSA ZTNA ZeroTrust Kerberos SSO ActiveDirectory DomainController DeviceAccess MicrosoftGraph
Functions
Invoke-GraphRequestWithRetry Get-GraphCollection Get-GraphErrorMessage Resolve-ConnectorGroup ConvertTo-PortRange Get-PortKey ConvertTo-DcRecord Test-IPv4Address
Dependencies
-
- Microsoft.Graph.Authentication (>= 2.0.0)
Release Notes
1.1 - Binds new applications to the default connector group unless -ConnectorGroupName is specified. Binds connector groups with no active connectors, with a warning. Removes -SkipConnectorCheck. Adds -EnableDeviceAccess. Fixes an error that stopped the script while hiding new applications from users.
1.0 - Initial release.
FileList
- New-GSADomainControllerApp.nuspec
- New-GSADomainControllerApp.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.1 (current version) | 13 | 12/2/2026 |