Need to enable IPv6 and apply static addresses?
Are you ready for IPv6 and have a need to enable and apply IPv6 static addresses to a list of devices? We have recently been tasked to do just that on our servers, since we now have our infrastructure and applications ready for IPv6 and can now take full advantage of all the benefits it brings. But the challenge is, we have close to a hundred servers in our department alone, and I was not about to login to each server and get carpal tunnel from clicking and typing around... So, I wrote a simple script that would help us, and hopefully it will help others too :).
The script is fairly simple... It remotely enables IPv6 (if it isn't already) and apply the given IPv6 static addresses you assign accordingly based on the list you specify in the CSV format. If the target device has multiple NICs, it only assigns the static address to the given NIC name you provide in the param section (see $DedicatedNIC). It also detects whether you have NIC teaming enabled and once again, it only applies the static address to the given name of that Teamed NIC you specify in the param section (see $DedicatedTeamNic). Additionally, it creates a log for you in the same folder where the script is for monitoring the progress.
Set-Static-IPv6.ps1 -CsvFile <path to the csv file> -PrefixLength <PrefixLength> -PreferredDNS <Primary IPV6DNS Address> -AlternateDNS <Alternate IPV6DNS Address>
[string]$PrefixLength = "64",
[string]$PreferredDNS = "xxxx:xxx:xxxx:xxxx::1111",
[string]$AlternateDNS = "xxxx:xxx:xxxx:xxxx::1112",
[string]$DedicatedTeamNIC = "Team",
[string]$DedicatedNIC = "Ethernet"
- --> Click HERE to download the script. <---
Congrats on being IPv6 ready! :) :) :)
- Created on .