Get-ADDomainController

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Malik Amaduddin Malik Amaduddin 1 year, 11 months ago.

  • Author
    Posts
  • #21311
    Profile photo of Malik Amaduddin
    Malik Amaduddin
    Participant

    I am running a simple command

    [b]Dunk> Get-ADDomainController -Filter *[/b]

    But getting the error

    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.A
    ctiveDirectory.Management.Commands.GetADDomainController

    What can be the problem. I saw the same command being used in different KBs and Forums, without anyissues.

  • #21312
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    You have the AD cmdlets loaded obviously. What rights do you have in the domain and are you running PowerShell with elevated privileges? is the connection from your machine to the domain controller corrupted – use Test-ComputerSecureChannel on the machine you are using

    • #21350
      Profile photo of Malik Amaduddin
      Malik Amaduddin
      Participant

      Sorry for the late reply.

      1. If I use the Get-ADDomainController with the '-Server' parameter. i am able to get the information of all the domain controllers. I believe that this would mean that I have the necessary permissions.

      2. Test-ComputerSecureChannel returns the value True. And also if I run this computer with the name of the different Domain Controllers it is returning True.

      It is very puzzling.

You must be logged in to reply to this topic.