[Ronin Windows] Set Dynamic Dns Registration AWS instances
Categories
(Infrastructure & Operations :: RelOps: Puppet, task)
Tracking
(Not tracked)
People
(Reporter: markco, Assigned: markco)
References
Details
https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/OCC-Bootstrap.psm1
function Set-DynamicDnsRegistration {
param (
[switch] $enabled = $false
)
begin {
Write-Log -message ('{0} :: begin - {1:o}' -f $($MyInvocation.MyCommand.Name), (Get-Date).ToUniversalTime()) -severity 'DEBUG'
}
process {
foreach($nic in (Get-WmiObject "Win32_NetworkAdapterConfiguration where IPEnabled='TRUE'")) {
$nic.SetDynamicDNSRegistration($enabled)
Write-Log -message ('{0} :: dynamic dns registration {1} on network interface {2} ({3})' -f $($MyInvocation.MyCommand.Name), $(if ($enabled) {'enabled'} else {'disabled'}), $nic.Index, $nic.Description) -severity 'DEBUG'
}
}
end {
Write-Log -message ('{0} :: end - {1:o}' -f $($MyInvocation.MyCommand.Name), (Get-Date).ToUniversalTime()) -severity 'DEBUG'
}
}
Assignee | ||
Comment 1•6 years ago
|
||
Dynamic DNS is enabled by default on modern Windows OSes.
Description
•