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 code.msdn.microsoft.com/dnsshell.

8 Comments

  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.

    -hal
    co-host, PowerScripting Podcast
    http://powerscripting.net

  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

    Any

  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 framsdc32.labmagna.global -ZoneName labmagna.global -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 framsdc32.labmagna.global -ZoneName labmagna.global -RecordType SRV -Name _VLMCS | Remove-DnsObject

    Confirm
    Remove-DnsObject will delete _VLMCS._tcp.labmagna.global
    [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 framsdc32.labmagna.global -ZoneName labmagna.global -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,
    Philipp

    • 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.

      Chris

  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 :)
    thanks

  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

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

    BR Peter

You must be logged in to leave a reply.