Windows Server 2025 - Network Profile Fix for Domain Controllers
Windows Server 2025 - Public Network Profile Fix for Domain Controllers
Steps mentioned in the video:
------------------------------------------------------------------------------------------------------------------
Disable NegativeCache registry settings (the time that a client remembers that a domain controller can't be found)
------------------------------------------------------------------------------------------------------------------
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NetLogon\Parameters" -Name "NegativeCachePeriod" -Value 0 -Type DWORD
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" -Name "MaxNegativeCacheTtl" -Value 0 -Type DWORD
---------------------------------------------------------------------------------------
Set Network Location Awareness Service to not immediately give up upon not finding a DC
---------------------------------------------------------------------------------------
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters" -Name "AlwaysExpectDomainController" -Value 1 -Type DWORD
-----------------------------------------------------
Set the NLA Service to Automatic
-----------------------------------------------------
Open Services
Right click the NLA Service
Set startup type to automatic
--------------------------------------------------------
If all of the above still doesn't work
--------------------------------------------------------
Create a scheduled task to restart your NIC adapters as soon as the OS boots. Use the Powershell script below.
Change the script to reference the name of your ethernet adapter. Typically it is called "Ethernet" (this is in the script). Change it if the name of the NIC is different.
1. Open Powershell with elevated priviledges.
2. Execute the script
PS C:\Folder> powershell.exe -executionPolicy Bypass .\AutomaticNICRestartScheduledTask.ps1
Verzeichnis: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 02.07.2025 15:02 Scripts
Actions : {MSFT_TaskExecAction}
Author :
Date :
Description : This scheduled task was created to automatically restart network adapters to workaround a known
issue with Windows Server 2025 pulling a public network profile on Domain Controllers instead of
a Domain network.
Documentation :
reboot the server
Principal : MSFT_TaskPrincipal2
SecurityDescriptor :
Settings : MSFT_TaskSettings3
Source :
State : Ready
TaskName : Automatically Restart NIC Adapter
TaskPath : \
Triggers : {MSFT_TaskBootTrigger}
URI : \Automatically Restart NIC Adapter
Version :
PSComputerName :
Scheduled task 'Automatically Restart NIC Adapter' has now been registered