Sha256: ab5ef8aa8730408b4b10d91f841c86dae2e4ceaf71005c08cb7137ceab41466f

Contents?: true

Size: 315 Bytes

Versions: 37

Compression:

Stored size: 315 Bytes

Contents

if ((!(Get-DnsClientServerAddress| where-object {$_.InterfaceAlias -like "Ethernet*" -and $_.ServerAddresses -contains '<%= @dc_ips[0] %>' -and $_.ServerAddresses -contains '<%= @dc_ips[1] %>'})))
{
	Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses <%= @dc_ips.join(", ") %>
	Restart-Computer -Force
}

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
cloud-mu-3.5.1 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.5.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.4.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.3.2 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.3.1 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.3.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.2.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.6 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.5 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.4 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.3 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.2 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.2beta2 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.1 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.1.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.0.2 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.0.1 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.0.0 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-3.0.0beta cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb
cloud-mu-2.0.4 cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb