Consolidate laboratory network and client maintenance policies

This commit is contained in:
alexrg committed 2026-10-14 21:49:32 -06:00
1 parent bfa520dec8
commit 5cda541e3d
20 files changed
+534 -107

No files matched your search

@@ -12,7 +12,7 @@ if (-not $computer.PartOfDomain -or $computer.DomainRole -ne 1) { return }
# A site-local DNS server is optional. Change only an adapter whose directly
# connected subnet contains that server, after verifying its authoritative DNS
# answer. Other sites, VPN adapters and Internet-only interfaces are preserved.
if ($LocalDnsServer) {
if ($LocalDnsServer -and $env:COMPUTERNAME -notmatch '^(AF|SD|SI)-') {
$dnsBytes = ([Net.IPAddress]::Parse($LocalDnsServer)).GetAddressBytes()
foreach ($ip in @(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {
$_.AddressState -eq 'Preferred' -and $_.PrefixLength -gt 0 -and $_.PrefixLength -lt 32