After fixing a couple of authentication bugs with Set-DnsRecord and New-DnsRecord I decided to make an attempt to finish off some of the zone and server CmdLets.

The module now contains these additional CmdLets.

  • Refresh-DnsZone – Implements the ForceRefresh method for Secondary Zones
  • Reload-ADDnsZone – Implements the UpdateFromDS method for AD Integrated Zones
  • Reload-DnsZone
  • Reset-DnsZoneType – Implements the ChangeZoneType method
  • Resume-DnsZone
  • Set-DnsZoneTransfer – Implements the ResetSecondaries method
  • Start-DnsScavenging
  • Start-DnsService
  • Stop-DnsService
  • Suspend-DnsZone – Implements the Pause method
  • Update-DnsZoneFile

As usual, the module can be downloaded from


  1. Great site, and module! Keep up the good work. We mentioned your project on a recent podcast, hope it gets you a few more hits.

    co-host, PowerScripting Podcast


  2. I have DnsShell 0.4.2 working on a Windows 7 64-bit workstation, but cannot get it to work on Server 2008 R2.

    Importing the module succeeds, but running get-dns fails with:

    Get-Dns : The system detected an invalid pointer address in attempting to use a pointer argument in a call
    At line:1 char:8
    + get-dns <<<<
    + CategoryInfo : NotSpecified: (:) [Get-Dns], SocketException
    + FullyQualifiedErrorId : System.Net.Sockets.SocketException,DnsShell.PowerShell.CmdLet.GetDns



  3. Hi there,

    I have an issue with this great module when deleting some DNS-Records.
    The intention of the “Script” I’m writing is to get all KMS-Hosts within my DNS-Zone and delete some of them because they people in my domain use wrong KMS-Keys.

    PS C:Temp> get-DnsRecord -Server -ZoneName -RecordType SRV -Name _VLMCS

    Name RecordType TTL RecordData TimeStamp
    —- ———- — ———- ———
    _VLMCS._tcp.labmagna… SRV 3600 0 0 1688 framsdc01.m… Static

    PS C:Temp> get-DnsRecord -Server -ZoneName -RecordType SRV -Name _VLMCS | Remove-DnsObject

    Remove-DnsObject will delete
    [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): y
    Remove-DnsObject : Generic failure
    At line:1 char:122
    + get-DnsRecord -Server -ZoneName -RecordType SRV -Name _VLMCS | Remove-DnsOb
    ject <<<

    The problem is – as far as I see – that get-DnsRecord doesn’t deliver the correct Data. Or let’s say it delivers the correct data in the wrong attribute :-/

    Can somebody please help me with that issue?

    Kind regards,


    • Generic failure is being returned by the WMI interface, difficult to determine the cause unless I can reproduce it. I’ll have a look and see what can be done as soon as I have a moment or two.



  4. Hi, New-DnsRecord to should allow setting TTL=0 which is a valid value.
    in the current implementation, if TTL is set to 0, it’s being ignored


  5. Would you email me once u have a fix release 🙂


  6. Pingback: DNS bulk host (A) records creation « iSiek's blog about Microsoft Windows services

  7. Pingback: DNS bulk PTR records creation « iSiek's blog about Microsoft Windows services

  8. Peter Schmelzer

    great module. Thanks.
    Why do I need domain administrative rights to use the “Get-DnsRecord” cmdlet?

    BR Peter


Leave a Reply

Your email address will not be published. Required fields are marked *