Monthly Archives: October 2015

Creating DNS records

Following on from my previous post about creating a reverse lookup zone in DNS here’s a function to create records in that zone. The function takes an IP address and name (of host) and uses Add-DnsServerResourceRecordA  to add the record … Continue reading

Posted in DNS, Powershell, Windows Server 2012 R2 | 1 Comment

Create a reverse lookup zone

I needed to create a DNS reverse lookup zone for my test environment. With Windows Server 2012 R2 I’ve got cmdlets available for managing DNS servers – the DnsServer module. You need to install the DNS role or the DNS … Continue reading

Posted in DNS, Powershell, Windows Server 2012 R2 | Leave a comment

Win free entry to the PowerShell Summit

Want to go to the PowerShell Summit? Want to go for free? You can win free entry to the Summit (need to pay your own travel & hotel) through the competition at http://powershell.org/wp/2015/10/28/win-a-free-4-day-pass-to-powershell-and-devops-summit-2016/

Posted in Powershell, Summit | Leave a comment

-in operator

As an alternative to the –contains operator you can use the –in operator Repeating the tests from the previous post on –contains PS> $primes = 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47PS> $candidate = 7PS> $candidate -in $primesTruePS> $candidate = 4PS> $candidate -in $primesFalse The –in … Continue reading

Posted in Powershell Basics | Leave a comment

-contains operator

Sometimes you may want to test if a value is in a collection of values For instance $primes = 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47 if you want to test if 7 is a member of the collection $candidate = 7 $primes -contains $candidateTrue Likewise … Continue reading

Posted in Powershell Basics | Leave a comment

DSC resource kit update–October 2015

The DSC resource kit is the primary place to look for DSC resources beyond those baked into Windows. An update to the resources in the kit has been announced. Some new resources and lots of bug fixes. see http://blogs.msdn.com/b/powershell/archive/2015/10/23/dsc-resource-kit-updates-are-here.aspx for … Continue reading

Posted in DSC, Powershell | Leave a comment

Testing connectivity before Invoke-Command

A question on the forum asked about testing if a remote machine could be reached before using Invoke-Command against it. The usual way to test if you can reach a remote machine is to ping it PS> Test-Connection -ComputerName $env:COMPUTERNAME … Continue reading

Posted in Powershell Basics | Leave a comment