
If the domain is available and the DNS service is working correctly, you need to check the status of Active Directory Web Services on your domain controller.Īctive Directory Web Services was unable to determine if the computer is a global catalog server. In this case, you must specify the domain controller name in all PowerShell cmdlets using the parameter –Server. Also, the ‘Unable to find a default server with Active Directory Web Services running’ error may appear if your computer is not joined to the Active Directory domain. Or: Move-ADDirectoryServerOperationMasterRole -Server dc02 …… Or you can run the AD PowerShell module cmdlets from your computer against the specific DC, using the –Server parameter. To do this, you can change the LogonServer using the command: nltest /SC_RESET:CONTOSO\ If your LogonServer is unavailable, not working properly, or blocked by a firewall, you can connect to another DC. The search for the domain controllers with the ADWS role is performed by the special DS_WEB_SERVICE_REQUIRED flag. You can find a DC with the ADWS role in another AD site: Get-ADDomainController -ForceDiscover -Discover -Service ADWS –NextClosestSite Run the following command on any domain controller to find the nearest DC with the ADWS role: Get-ADDomainController -Discover -Service ADWS If the command returns TcpTestSucceeded: False, it means the connection is blocked by the firewall, the ADWS service is not running, or the DC is down. Test-NetConnection your_logon_DC -port 9389

Check the value of this environment variable on your computer: $env:LOGONSERVERĬheck the availability of port TCP/9389 on the domain controller name (specify the logonserver name) with the command: Use the following commands to check if your computer can access the domain: nslookup yourdomain.locīy default, the RSAT-AD-PowerShell module cmdlets try to connect to the domain controller that is specified in the LOGONSERVER environment variable. If you are running your PowerShell commands on a non-domain controller device, the first thing to check is if you have connectivity with your Active Directory domain.

Troubleshooting Active Directory Web Services Connectivity in Windows The TCP port 9389 on the domain controller must be accessible from your computer to communicate properly with ADWS.

The PowerShell AD module uses Active Directory Web Services on DC to communicate with ADDS. The ADWS service is installed on a domain controller and used to provide remote management of AD Directory Services through the WS-Management protocols.

This error occurs because your computer was unable to connect to Active Directory Web Services (ADWS) on the nearest domain controller. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running. Set-ADUser : Unable to contact the server.
