
Windows system administrators who use the Active Directory module for PowerShell sometimes encounter an error such as "Unable to find a default server with Active Directory Web Services running" or a message stating that a specified server does not have the Active Directory Web Services running. This error prevents cmdlets like Get-ADUser, Get-ADComputer, and Get-ADGroup from working, which can disrupt automation scripts and daily administrative tasks. The good news is that the issue is usually caused by a handful of predictable problems that can be fixed with systematic troubleshooting.
Getting Expert Help With Web-Based Tools and Systems From AAMAX.CO
Organizations that rely on Active Directory often also need internal portals, dashboards, and web applications that connect with their identity systems. AAMAX.CO is a full-service digital marketing company offering web development, digital marketing, and SEO services worldwide. They build secure, custom web solutions, including employee portals and business applications, that integrate with existing infrastructure. Their developers understand authentication, access control, and performance, helping companies modernize internal tools without compromising security.
What Active Directory Web Services Does
Active Directory Web Services (ADWS) is a Windows service that runs on domain controllers and Active Directory Lightweight Directory Services instances. It was introduced with Windows Server 2008 R2 and provides a web service interface to directory data. The Active Directory module for Windows PowerShell and the Active Directory Administrative Center both communicate with domain controllers through ADWS rather than using traditional LDAP connections directly.
ADWS listens on TCP port 9389 by default. If a client cannot reach this service on a domain controller, the PowerShell module cannot retrieve or modify directory objects, and you see the error in question.
Common Causes of the Error
Several issues can trigger this error:
- The ADWS service is stopped: The service may have crashed, been disabled, or failed to start after a reboot.
- Firewall blocking port 9389: Network firewalls or Windows Defender Firewall rules may block the required port between the client and the domain controller.
- DNS resolution problems: The client may be unable to locate a domain controller because DNS settings point to the wrong servers.
- Running from a non-domain machine: If the computer is not joined to the domain or is connected to a different network, default server discovery fails.
- Legacy domain controllers: Very old domain controllers without ADWS cannot respond to modern AD cmdlets.
- Time synchronization issues: Large clock differences between machines can break Kerberos authentication and interfere with communication.
Step 1: Check the ADWS Service on the Domain Controller
Log in to the domain controller and open the Services console, or run the PowerShell command Get-Service ADWS. Confirm that the status is Running and the startup type is set to Automatic. If it is stopped, start it with Start-Service ADWS. Review the Event Viewer under Applications and Services Logs, then Active Directory Web Services, for errors that explain why it stopped.
Step 2: Test Network Connectivity to Port 9389
From the client machine, run Test-NetConnection with the domain controller's name and port 9389. If the test fails, check Windows Defender Firewall on the domain controller, any network firewalls between sites, and VPN configurations. Make sure inbound rules for Active Directory Web Services are enabled.
Step 3: Verify DNS and Domain Controller Discovery
Use the command nltest /dsgetdc:yourdomain.com to verify that the client can locate a domain controller. Check that the client's DNS servers point to internal domain DNS servers rather than public resolvers. Incorrect DNS is one of the most common hidden causes of directory errors.
Step 4: Specify a Server Explicitly
If automatic discovery fails, you can direct cmdlets to a specific domain controller using the -Server parameter, for example Get-ADUser username -Server dc01.yourdomain.com. This is especially useful in multi-domain forests, when working across trusts, or when running scripts from machines outside the primary site. If an explicit server works while default discovery does not, the issue is likely related to DNS or site configuration.
Step 5: Check Time Synchronization and Updates
Kerberos authentication requires that client and server clocks be closely synchronized. Run w32tm /query /status to check time settings. Also ensure both the client and domain controller have current Windows updates, as some bugs affecting ADWS have been resolved in cumulative updates.
Step 6: Restart and Re-test
After making changes, restart the ADWS service and, if necessary, re-import the Active Directory module in PowerShell. Run a simple command like Get-ADDomain to confirm that communication works. Document the fix so your team can resolve similar issues faster in the future.
Preventing the Error in the Future
Proactive monitoring can stop this error from disrupting operations. Configure alerts for the ADWS service status, monitor domain controller health, maintain accurate DNS records, and document firewall requirements for port 9389. When building scripts and automation, include explicit -Server parameters or error handling so that failures are logged clearly rather than causing silent problems.
Many organizations also build internal dashboards that display directory health, account statuses, and automation results. Custom tools created through professional web application development can give IT teams a clear view of their environment and reduce the time spent on manual troubleshooting.
Final Thoughts
The error stating that a server does not have the Active Directory Web Services running is frustrating, but it is rarely mysterious. By checking the ADWS service, confirming connectivity on port 9389, validating DNS, specifying servers explicitly, and keeping systems synchronized and updated, administrators can resolve the issue quickly and keep their PowerShell automation running smoothly.
