User Tools

Site Tools


azure_arc_update_manager_timeout_during_patch_assessment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
azure_arc_update_manager_timeout_during_patch_assessment [2025/05/21 19:01] – created osoazure_arc_update_manager_timeout_during_patch_assessment [2025/05/22 13:50] (current) – [🔁 Bulk Fix (Multiple Computers)] oso
Line 22: Line 22:
 These steps reset the Arc update extension state by stopping services, removing cached extension data, and restarting the relevant components. These steps reset the Arc update extension state by stopping services, removing cached extension data, and restarting the relevant components.
  
 +----
 ===== 🔧 Manual Steps (Single Computer) ===== ===== 🔧 Manual Steps (Single Computer) =====
  
Line 47: Line 48:
  
 <code powershell> <code powershell>
 +# List of computers
 $computers = @("server01", "server02", "server03") $computers = @("server01", "server02", "server03")
  
-\$scriptBlock = { +# Define the script block to execute on each remote computer 
-try { +$scriptBlock = { 
-    Write-Host "\[\$env\:COMPUTERNAME] Stopping services..." -ForegroundColor Cyan+    try { 
 +        Write-Host "[$env:COMPUTERNAME] Stopping services..." -ForegroundColor Cyan
  
-    Stop-Service -Name AutoAssessPatchesService -ErrorAction SilentlyContinue +        Stop-Service -Name AutoAssessPatchesService -ErrorAction SilentlyContinue 
-    Stop-Process -Name "gc_arc_service" -Force -ErrorAction SilentlyContinue +        Stop-Process -Name "gc_arc_service" -Force -ErrorAction SilentlyContinue 
-    Stop-Process -Name "gc_extension_service" -Force -ErrorAction SilentlyContinue +        Stop-Process -Name "gc_extension_service" -Force -ErrorAction SilentlyContinue 
-    Stop-Process -Name "AutoAssessPatchService" -Force -ErrorAction SilentlyContinue+        Stop-Process -Name "AutoAssessPatchService" -Force -ErrorAction SilentlyContinue
  
-    Write-Host "[$env:COMPUTERNAME] Removing extension files..." -ForegroundColor Cyan +        Write-Host "[$env:COMPUTERNAME] Removing extension files..." -ForegroundColor Cyan 
-    Remove-Item -Path "C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension" -Recurse -Force -ErrorAction SilentlyContinue+        Remove-Item -Path "C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension" -Recurse -Force -ErrorAction SilentlyContinue
  
-    Write-Host "[$env:COMPUTERNAME] Removing Arc extensions..." -ForegroundColor Cyan +        Write-Host "[$env:COMPUTERNAME] Removing Arc extensions..." -ForegroundColor Cyan 
-    azcmagent extension remove -n WindowsPatchExtension | Out-Null +        azcmagent extension remove -n WindowsPatchExtension | Out-Null 
-    azcmagent extension remove -n WindowsOsUpdateExtension | Out-Null+        azcmagent extension remove -n WindowsOsUpdateExtension | Out-Null
  
-    Write-Host "[$env:COMPUTERNAME] Starting Arc services..." -ForegroundColor Cyan +        Write-Host "[$env:COMPUTERNAME] Starting Arc services..." -ForegroundColor Cyan 
-    Start-Service -Name "GCArcService" -ErrorAction SilentlyContinue +        Start-Service -Name "GCArcService" -ErrorAction SilentlyContinue 
-    Start-Service -Name "ExtensionService" -ErrorAction SilentlyContinue+        Start-Service -Name "ExtensionService" -ErrorAction SilentlyContinue
  
-    Write-Host "[$env:COMPUTERNAME] Done." -ForegroundColor Green +        Write-Host "[$env:COMPUTERNAME] Done." -ForegroundColor Green 
-} catch { +    } catch { 
-    Write-Warning "[$env:COMPUTERNAME] Failed: $_"+        Write-Warning "[$env:COMPUTERNAME] Failed: $_" 
 +    }
 } }
  
 +# Loop over each computer and invoke the script remotely 
 +foreach ($computer in $computers) { 
 +    Write-Host "Processing $computer..." -ForegroundColor Yellow 
 +    Invoke-Command -ComputerName $computer -ScriptBlock $scriptBlock -ErrorAction Continue
 } }
- 
-foreach (\$computer in \$computers) { 
-    Write-Host "Processing \$computer..." -ForegroundColor Yellow 
-    Invoke-Command -ComputerName \$computer -ScriptBlock \$scriptBlock -ErrorAction Continue 
- 
 </code> </code>
  
azure_arc_update_manager_timeout_during_patch_assessment.1747854062.txt.gz · Last modified: 2025/05/21 19:01 by oso