locked
New-DNSRecord using gives error Invalid Namespace RRS feed

  • Question

  • Hi Team, 

    i am using the following cmd and getting following error .

    ----------------------------                 

    New-DnsRecord -Name VM1 -RecordType A -Zone <DNSdomainname> -IPAddress <IP>

    -----------------------------------             ERROR -------------------------------------------

    New-DnsRecord : Invalid namespace
    At line:1 char:14
    + New-DnsRecord <<<<  -Name test12345 -RecordType A -ZoneName wintelsys.com -IPAddress 192.168.1.10
        + CategoryInfo          : InvalidOperation: (DnsShell.PowerS...anagementCmdlet:RuntimeType) [New-DnsRecord], Manag
       ementException
        + FullyQualifiedErrorId : WMIManagementException,DnsShell.PowerShell.CmdLet.NewDnsRecord

    New-DnsRecord : Object reference not set to an instance of an object.
    At line:1 char:14
    + New-DnsRecord <<<<  -Name test12345 -RecordType A -ZoneName wintelsys.com -IPAddress 192.168.1.10
        + CategoryInfo          : NotSpecified: (:) [New-DnsRecord], NullReferenceException
        + FullyQualifiedErrorId : System.NullReferenceException,DnsShell.PowerShell.CmdLet.NewDnsRecord

    ------------------

    i have also visited below site but Did not get a idea what to do ?

    http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/13/manage-dns-in-a-windows-environment-by-using-powershell.aspx

    Can you please guide me what to do in this case ?

    Wednesday, August 19, 2015 1:26 PM

Answers

  • Hi its solved,

    I used 2012 R2 server and win 8.1 with RSAT and used 2012 R2 DNSServer Module. 

    Thanks .. 

    Tuesday, September 1, 2015 2:56 PM

All replies

  • Hi team, 

    can any one please suggest ....................

    Thursday, August 20, 2015 6:57 AM
  • Where did you get the script from.  I suspect you are using it on the wrong version of DNS.


    \_(ツ)_/

    Thursday, August 20, 2015 10:24 AM
  • Hi team,

    can any one please suggest ....................

    This is a peer-to-peer question-and-answer forum. There is no SLA here that requires someone to answer your question or to drive you to a resolution.

    http://blogs.msdn.com/b/oldnewthing/archive/2008/03/04/8014283.aspx


    -- Bill Stewart [Bill_Stewart]

    Thursday, August 20, 2015 2:10 PM
  • Hi JRV,

    I have imported the DNSShell Module and copied to"%systemroot%\System32\WindowsPowerShell\v1.0\Modules" 

    I am running this cmdlet on Win 8.1 and Win 7. 


    Tuesday, August 25, 2015 5:06 AM
  • Post you issues with this module in the CodePlex forum for the module: https://dnsshell.codeplex.com/discussions


    \_(ツ)_/

    • Proposed as answer by Mike Laughlin Tuesday, August 25, 2015 11:49 AM
    Tuesday, August 25, 2015 5:17 AM
  • Hi its solved,

    I used 2012 R2 server and win 8.1 with RSAT and used 2012 R2 DNSServer Module. 

    Thanks .. 

    Tuesday, September 1, 2015 2:56 PM