fix(template): §7.4 Validate-SetupState -Remediate flag + Setup/Deploy tweaks

This commit is contained in:
Simone
2026-05-10 14:26:35 +02:00
parent 7d6ae42fcf
commit 41611d46a7
6 changed files with 149 additions and 9 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ try {
Set-Item WSMan:\localhost\Client\AllowUnencrypted $true -Force
$cur = (Get-Item WSMan:\localhost\Client\TrustedHosts).Value
if ($cur -ne '*' -and $cur -notmatch [regex]::Escape($VMIPAddress)) {
Set-Item WSMan:\localhost\Client\TrustedHosts -Value ($cur ? "$cur,$VMIPAddress" : $VMIPAddress) -Force
$newHosts = if ($cur) { "$cur,$VMIPAddress" } else { $VMIPAddress }
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $newHosts -Force
}
Write-Host "`nValidating Deploy state on $VMIPAddress..." -ForegroundColor Cyan