Get-DnsServerResourceRecord - "Invalid namespace"

Welcome Forums General PowerShell Q&A Get-DnsServerResourceRecord - "Invalid namespace"

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
4 years, 1 month ago.

  • Author
    Posts
  • #20046

    Participant
    Points: 22
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

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

  • #20048

    Member
    Points: 0
    Rank: Member

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

  • #20049

    Participant
    Points: 22
    Rank: Member

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

The topic ‘Get-DnsServerResourceRecord - "Invalid namespace"’ is closed to new replies.