I hope someone can help me with an error I am receiving. I have ServerA in Domain1 and my workstation in Domain2.
When I am on ServerA I can do “Get-DHCPServerInDC” and it returns a list of DHCP servers as expected.
However when I Enter-PSSession to the server from my workstation using the correct credentials for Domain1 I get the following error:
Failed to initialize directory service resources for domain Domain1.
+ CategoryInfo : ResourceUnavailable: (PS_DhcpServerInDC:root/Microsoft/…_DhcpServerInDC) [Get-DhcpServerInDC], CimException
+ FullyQualifiedErrorId : DHCP 20070,Get-DhcpServerInDC
+ PSComputerName : ServerA.Domain1
I have also tried Invoke-Command instead of Enter-PSSession but I get the same error. I also get the same error if I Enter-PSSession or Invoke-Command from another server in the same Domain as ServerA.
Pretty sure you might be hitting some form of double hop, but it may not be the double hop. Wondering if there is something going on under the covers of the AD module that’s creating the issue. Also what if any relationship do the two domains have, it’s not clear from your original description if they are child/parent or completely unrelated.
Although I do get the same error even when I try to Enter-PSSession or Invoke-Command from a server in the same domain. It works fine locally however on the server.