Get-DnsServerResourceRecord - "Invalid namespace"

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Adam Bertram Adam Bertram 2 years, 1 month ago.

  • Author
    Posts
  • #20046
    Profile photo of Adam Bertram
    Adam Bertram
    Participant

    I'm using Microsoft's DnsServer module on my local workstation and the Get-DnsServerResourceRecord cmdlet works just fine. However, when I try the same on a server logged in under another user account I'm continually getting an error "Invalid Namespace". It seems that's probably doing something with WMI under the hood but it's a binary module and I can't see the code.

    Anyone have any ideas on where to start?

  • #20047
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    It's a CIM cmdlet, so very likely only works on Windows Server 2012 or later.

  • #20048
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Looks like it uses WMI classes in the root/Microsoft/Windows/DNS namespace (PS_DnsServerResourceRecord, etc).

  • #20049
    Profile photo of Adam Bertram
    Adam Bertram
    Participant

    Ah! Yes, you are correct. Thanks, Dave!

You must be logged in to reply to this topic.