Skip to content

Commit 0098520

Browse files
fix gitleaks false positive
1 parent 086f180 commit 0098520

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

scripts/powershell/arc-setup.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,17 @@ try {
160160
Write-Log "Could not remove scheduled task: $($_.Exception.Message)" "WARNING"
161161
}
162162

163+
# Re-enable the Guest Agent so Azure Run Command can report success back to Azure.
164+
# Arc evaluation posture is preserved: MSFT_ARC_TEST env var and the IMDS firewall
165+
# block (169.254.169.254) both persist independently of the Guest Agent. # gitleaks:allow
166+
# The Guest Agent uses WireServer (168.63.129.16), not IMDS, so it does not # gitleaks:allow
167+
# interfere with Arc evaluation mode.
168+
Write-Log "Re-enabling Azure VM Guest Agent for Run Command status reporting..." "INFO"
169+
Set-Service WindowsAzureGuestAgent -StartupType Automatic -ErrorAction SilentlyContinue
170+
Start-Service WindowsAzureGuestAgent -ErrorAction SilentlyContinue
171+
Start-Sleep -Seconds 20
172+
Write-Log "Azure VM Guest Agent re-enabled" "SUCCESS"
173+
163174
Write-Log "=========================================" "SUCCESS"
164175
Write-Log "Azure Arc Setup Completed Successfully!" "SUCCESS"
165176
Write-Log "=========================================" "SUCCESS"

0 commit comments

Comments
 (0)