Exchange 2016 – Event Error 4127
One of the event errors that may appear in the exchange server’s event viewer is event error 4127 as following:
”
Process powershell.exe (PID=16988). Component: Microsoft.Exchange.Data.Directory.ConfigurationSettingsADNotificationException: Error running AD operation. —> Microsoft.Exchange.Data.Directory.ADTopologyUnexpectedException: Unexpected error when calling the Microsoft Exchange Active Directory Topology service on server ‘TopologyClientTcpEndpoint (localhost)’. Error details: Access is denied.. —> System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.
”
It should be a permission related to Exchange PowerShell and you can check the following three solution:
- 
Recycle the PowerShell App Pool in IIS manager: MSExchangePowerShellAppPool and MSExchangePowerShellFrontEndAppPool:
  
 
- 
Reset the PowerShell virtual directory in EAC:
 Open Exchange Admin Center > Servers > Virtual directories: 
  
 
- 
If the issue still exist you should delte and recreate the powershell virtual directory as following
 - Get the PowerShell virtual directory Identity
 
 Get-PowerShellVirtualDirectory | Fl Server,Identity 
 - Delete the PowerShell virtual directory
 
 Remove-PowerShellVirtualDirectory “virtual directory Identity” 
 - 
Create the PowerShell virtual directory
 New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False 
 
- 
Run iisreset in cmd prompt to refresh
 
 
- Get the PowerShell virtual directory Identity
Ratish Nair
Microsoft MVP | Office Servers and Services
Team @MSExchangeGuru






