Error I would like some enlightenment on...

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Sean Patzer Sean Patzer 1 month ago.

  • Author
  • #73691
    Profile photo of Sean Patzer
    Sean Patzer

    I have multiple DHCP servers that I need to be able to manage, that are all core servers. With the DHCP module being rich in functionality, what better time to learn Powershell with a definite goal in front of me. This demonstrates that remoting is setup properly (I think, as I am executing a core command between systems and I am going cross domains successfully). However, I cannot make a listing of DHCP servers work.

    PS C:\WINDOWS\system32> Get-Process Powershell
    Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
    -------  ------    -----      -----     ------     --  -- -----------
        818      45   156904     200928       5.44   4532   1 powershell
        772      39   142328     165348       2.23  13536   1 powershell
    PS C:\WINDOWS\system32> Invoke-Command -ComputerName -Credential foo\DomainAdmin -ScriptBlock{Get-Process Powershell}
    Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName                    PSComputerName
    -------  ------    -----      -----     ------     --  -- -----------                    --------------
        685      46   156808     162652      17.09   2436   1 powershell           
    PS C:\WINDOWS\system32> Invoke-Command -ComputerName -Credential foo\DomainAdmin -ScriptBlock{Get-DHCPServerInDC}
    Failed to initialize directory service resources for domain
        + CategoryInfo          : ResourceUnavailable: (PS_DhcpServerInDC:root/Microsoft/..._DhcpServerInDC) [Get-DhcpServ
       erInDC], CimException
        + FullyQualifiedErrorId : DHCP 20070,Get-DhcpServerInDC
        + PSComputerName        :
    PS C:\WINDOWS\system32>

    I did spend some time going over what Powershell chaining or Double Hop is, and no this issue is not that. I am doing a 1-to-1 mapping with no intermediate system. (Enlighten me if I am wrong, I will try not take it as Lighting me...) This was launched from an administrative shell on the local workstation directly to the server in question. Yes, when launched locally the Get-DHCPServerInDC completes and returns a list of servers, on both the Workstation and Server.

    I am seeing that the Directory Service is unavailable in Foo, but what is causing the unavailability? Where do I go to further troubleshoot? Is this expected behavior and it is my expectation that needs to change?

    Any help would be greatly appreciated.

    All system IPs, Domain Names, and Account Names have been changed to protect the innocent.


    Addendum #1

    I did a :

    $cs = New-CIMSession -ComputerName -Credential foo\DomainAdmin
    Get-DHCPServerInDC -CimSessioin $cs

    and got the same error message as above. At least behavior is consistent.

  • #73699
    Profile photo of Curtis Smith
    Curtis Smith
    • #73703
      Profile photo of Sean Patzer
      Sean Patzer

      It is indeed a double hop, but the article is not clear until dawn breaks.

      The issue is not with Powershell to Powershell where beginners like myself are hung up (and I was too focused on the distraction of I am not going from a Powershell to a Powershell to a Powershell so how can I be double hopping ?). But the issue is with the transitions going on. And I missed it because I was looking too closely at the nodes.

You must be logged in to reply to this topic.