Powershell - Get-ADDomainController function broken when using filter parameter? RRS feed

  • Question

  • Today I'm trying to return all domain controller via command I always have been using but seems like its not working anymore?

    Not on the domain controller (Win2012R2) nor on my client machine (Windows10 1807 Enterprise)?

    Anyone knows what I'm doing wrong or did Microsoft changed something in recent updates?

    I also re-installed RSAT tools but didn't help.

    Execting command: Get-ADDomainController -Filter *


    Get-ADDomainController : Directory object not found
    At line:1 char:1
    + Get-ADDomainController -Filter *
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (:) [Get-ADDomainController], ADIdentityNotFoundException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.GetADDomainController

    • Moved by Bill_Stewart Wednesday, September 5, 2018 9:55 PM Unable to reproduce
    Friday, June 15, 2018 2:26 PM

All replies

  • Restart all ADWS servers. You can just recycle the service to see if that helps.


    Friday, June 15, 2018 2:35 PM
  • If that would have been the issue I wouldn't be able to use: 

    Get-ADDomainController -Server [dcname]

    that works fine.

    I could build the script using foreach loop collecting the dc hostname from domain controllers OU.

    But it always worked with the filter parameter so it's annoying why it suddenly stops working if you always did it like that.  All my older scripts are build up with those parameters.

    FYI: I'm running Powershell 5.1 

    Friday, June 15, 2018 2:57 PM
  • No.  When the ADWS service gets corrupted it causes weird intermittent issues.  I have seen it many times.

    This is not really a break/fix forum.  You will either have to apply standard troubleshooting methods or contact a consultant or MS Support for this issue.


    Friday, June 15, 2018 3:03 PM
  • I noticed there are Windows Updates waiting probably when there installed and server reboot it will work again I hope.  Going to monitor the situation.
    Saturday, June 16, 2018 1:45 PM