Disable IPv6 on Windows adapters

This commit is contained in:
Chris Long
2019-12-04 13:45:43 -08:00
parent f64ff20aaf
commit 4a8485c28e

View File

@@ -7,6 +7,9 @@ $box = $box.ComputerName.ToString().ToLower()
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Setting timezone to UTC..."
c:\windows\system32\tzutil.exe /s "UTC"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Disable IPv6 on all network adatpers..."
Get-NetAdapterBinding -ComponentID ms_tcpip6 | ForEach-Object {Disable-NetAdapterBinding -Name $_.Name -ComponentID ms_tcpip6}
if ($env:COMPUTERNAME -imatch 'vagrant') {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Hostname is still the original one, skip provisioning for reboot..."