azure_arc_update_manager_timeout_during_patch_assessment
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| azure_arc_update_manager_timeout_during_patch_assessment [2025/05/21 19:01] – created oso | azure_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 = @(" | $computers = @(" | ||
| - | \$scriptBlock = { | + | # Define the script block to execute on each remote computer |
| - | try { | + | $scriptBlock = { |
| - | Write-Host "\[\$env\: | + | try { |
| + | Write-Host " | ||
| - | | + | |
| - | Stop-Process -Name " | + | Stop-Process -Name " |
| - | Stop-Process -Name " | + | Stop-Process -Name " |
| - | Stop-Process -Name " | + | Stop-Process -Name " |
| - | | + | |
| - | Remove-Item -Path " | + | Remove-Item -Path " |
| - | | + | |
| - | 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 |
| - | | + | |
| - | Start-Service -Name " | + | Start-Service -Name " |
| - | Start-Service -Name " | + | Start-Service -Name " |
| - | | + | |
| - | } catch { | + | } catch { |
| - | Write-Warning " | + | Write-Warning " |
| + | } | ||
| } | } | ||
| + | # Loop over each computer and invoke the script remotely | ||
| + | foreach ($computer in $computers) { | ||
| + | Write-Host " | ||
| + | Invoke-Command -ComputerName $computer -ScriptBlock $scriptBlock -ErrorAction Continue | ||
| } | } | ||
| - | |||
| - | foreach (\$computer in \$computers) { | ||
| - | Write-Host " | ||
| - | Invoke-Command -ComputerName \$computer -ScriptBlock \$scriptBlock -ErrorAction Continue | ||
| - | } | ||
| </ | </ | ||
azure_arc_update_manager_timeout_during_patch_assessment.1747854062.txt.gz · Last modified: 2025/05/21 19:01 by oso
