Finding DNS static records

An interesting question from the forums about finding DNS static records

You can view the records in a DNS zone

Get-CimInstance -Namespace root\MicrosoftDNS -ClassName MicrosoftDNs_Atype -ComputerName W16DC01  -Filter “DomainName = ‘manticore.org'” |
select OwnerName, Timestamp, IPAddress

but how do you know which are static records.

There isn’t an obvious way to do it but if you dig into the records (hint create a static record and look at the differences) you’ll see that static records have a timestamp of 0

So to see just the static records

Get-CimInstance -Namespace root\MicrosoftDNS -ClassName MicrosoftDNs_Atype -ComputerName W16DC01 -Filter “DomainName = ‘manticore.org’ AND Timestamp = 0” |
select OwnerName, Timestamp, IPAddress

Rather than using the CIM class directly it’s simpler to use the cmdlets from the DNSserver module – install the remote admin tools to get access.

To view the A type records

Get-DnsServerResourceRecord -ComputerName W16DC01 -ZoneName ‘manticore.org’ -RRType A

To view the static records only

Get-DnsServerResourceRecord -ComputerName W16DC01 -ZoneName ‘manticore.org’ -RRType A |
where {-not $_.TimeStamp}

Notice that you’re checking for the absence of a timestamp

Posted in DNS, Powershell, PowerShell and CIM | Leave a comment

Using Hyper-V

When you think of using Hyper-V most people think of virtualising their infrastructure – big servers running 10s, 100s or even 1000s of virtual machines.

There is another reason for using Hyper-V

You can use Hyper-V to create a VM so you can install an application that may conflict with you standard workstation – as an example you may need access to a component of an older version of Office for instance Infopath 2010 but you don’t want that application to conflict with your installation of the latest and greatest version of Office.

The Windows client operating system has the ability to install Hyper-V since Windows 8. So if you’re running Windows 8, Windows 8.1 or Windows 10 AND your machine is capable of supporting Hyper-V:

– Windows Enterprise, Professional or Educational

– 64-bit processor with SLAT

– CPU support for VM monitor mode extension

– Minimum of 4GB of memory

Install Hyper-V

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

Create a virtual switch and create your VMs

See https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v and subsequent links

Better still get a copy of Learn Hyper-V in a Month of Lunches

https://www.manning.com/books/learn-hyper-v-in-a-month-of-lunches

Posted in Hyper-V | Leave a comment

Summit 2017–seats going fast

Seats at eh PowerShell Summit –  https://eventloom.com/event/home/summit2017 – are going fast.

We’ve sold over 70% of the seats – they’re current 55 seats left split between 4-day and 3-day passes. The 3-day passes don’t go on sale until 12 February and we’ll be moving 3-day to 4-day as sales happen between now and then. We have a number of sales in the pipeline that will reduce the number of available seats as well.

We are at maximum capacity for the venue – and probably for the event in its present format.

We are expecting a rapid sell off of the remaining seats when open registration of 3-day passes. We don’t maintain any sort of waiting list and when the seats are gone – they’re gone.

If you are thinking of attending the 2017 Summit I’d advise you to get your seat booked quickly – I wouldn’t be at all surprised if we’d sold out by the end of February.

Posted in Powershell, Summit | Leave a comment

Learn Hyper-V – Deal of the day – January 28 2017

Deal of the Day January 28: Half off my book Learn Hyper-V in a Month of Lunches. Use code dotd012817au at http://bit.ly/2jAIfWK

More information from DOTD’s page at https://www.manning.com/dotd

Posted in Books, Hyper-V | Leave a comment

wmic deprecated

I saw a forum post today where the question involved the use of the wmi command line tool wmic.

Wmic was deprecated in Windows Server 2012 – https://technet.microsoft.com/en-us/library/hh831568(v=ws.11).aspx. It will eventually be removed.

You should use the CIM cmdlets instead of wmic. The syntax is much easier and the resultant code is easier to understand.

A little known fact – the PowerShell project was originally started as a replacement for wmic.

Posted in PowerShell and CIM, PowerShell and WMI | Leave a comment

Community Lightning Demos

We are continually evolving the content we present at the PowerShell Summit. This year we’re bringing back something that was a feature of the early PowerShell Deep Dives and Summits – the Community Lightning Demos. We have a session set aside on Wednesday afternoon for this. Timescales will depend on the number of people wanting to show something.

In the words of PowerShell MVP Warren Frame who’s organising this for us:

Ever wanted to present at Summit but were unsure if you could? This is your opportunity to present something you’ve discovered to your peers in the PowerShell community. A code trick, or tip, a new module you’ve created, an open source module or a feature of a cmdlet that’s relatively unknown.. The list goes on and on. Anything PowerShell, or DevOps related that you think is cool and that will interest other people is a suitable topic. We’re looking for 5-10 minute demos. Something you’ve done, discovered, solved or run up against. This is your opportunity to “give back” to our community by sharing your knowledge. Make sure its something you can present from your laptop and that you don’t need extensive Internet access. A sign up sheet will be available Sunday, Monday and Tuesday. We just need your name and topic. Who knows you may be asked to present a full session at the following Summit. Some of our best speakers started in the Lightning Demos sessions of past events.

This is your opportunity to start presenting to a knowledgeable and appreciative audience. In past events we’ve had some amazing things come to light – things the PowerShell team didn’t realise about PowerShell. If you have something to share please consider signing up for this.

Posted in Powershell, Summit | Leave a comment

WMF 5.1 now available

The download for WMF 5.1 for down level operating systems is now available:

https://blogs.msdn.microsoft.com/powershell/2017/01/19/windows-management-framework-wmf-5-1-released/

WMF 5.1 can be installed on Windows 7 and 8.1 plus Windows Server 2008 R2, 2012, 2012 R2

Windows 10 and Server 2016 already have PowerShell 5.1 and don’t need this install.

if installing on Windows 7 or Server 2008 R2 the installation process has changed – READ THE RELEASE NOTES OR BE PREPARED FOR A LOT OF EXTRA EFFORT

Posted in Powershell | Leave a comment