Closed Bug 1563292 Opened 6 years ago Closed 6 years ago

[Ronin Windows] Set Dynamic Dns Registration AWS instances

Categories

(Infrastructure & Operations :: RelOps: Puppet, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

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'
}
}

Blocks: 1559443

Dynamic DNS is enabled by default on modern Windows OSes.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.