azure_arc_update_manager_timeout_during_patch_assessment
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| azure_arc_update_manager_timeout_during_patch_assessment [2025/05/21 19:03] – [💡 Workaround Steps] oso | azure_arc_update_manager_timeout_during_patch_assessment [2025/05/22 13:50] (current) – [🔁 Bulk Fix (Multiple Computers)] oso | ||
|---|---|---|---|
| Line 48: | 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.1747854219.txt.gz · Last modified: 2025/05/21 19:03 by oso
