Wait for Windows enrollment network readiness

This commit is contained in:
2026-09-09 10:19:36 -06:00
parent 14c919b380
commit 1332f546fa
3 changed files with 42 additions and 4 deletions
+7
View File
@@ -99,6 +99,13 @@ Describe 'SGU public-cloud network safety' {
$source | Should Not Match "Get-NetRoute -AddressFamily IPv4 -DestinationPrefix '0\.0\.0\.0/0'"
}
It 'waits for the new address and WinRM route to stabilize' {
$source = Get-Content -LiteralPath $clientBootstrapPath -Raw
$source | Should Match "AddressState -eq 'Preferred'"
$source | Should Match 'function Wait-TcpPort'
$source | Should Match 'Wait-TcpPort -Address \$DomainControllerIPv4Address -Port 5985'
}
It 'uses an all-user machine-certificate VPN profile' {
$source = Get-Content -LiteralPath $azureClientPath -Raw
$source | Should Match '-AuthenticationMethod MachineCertificate'