AzStackHci.ManageUpdates

0.7.0

PowerShell module to manage Azure Local (Azure Stack HCI) cluster updates using Azure Update Manager APIs. Provides functions to start updates, check update status, list available updates, and monitor update runs.

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name AzStackHci.ManageUpdates

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name AzStackHci.ManageUpdates

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Microsoft. All rights reserved.

Package Details

Author(s)

  • Neil Bird Microsoft

Tags

Azure AzureLocal AzureStackHCI Updates UpdateManager HCI Automation CICD

Functions

Connect-AzureLocalServicePrincipal Start-AzureLocalClusterUpdate Get-AzureLocalClusterUpdateReadiness Get-AzureLocalClusterInventory Get-AzureLocalClusterInfo Get-AzureLocalUpdateSummary Get-AzureLocalAvailableUpdates Get-AzureLocalUpdateRuns Set-AzureLocalClusterUpdateRingTag Invoke-AzureLocalFleetOperation Get-AzureLocalFleetProgress Test-AzureLocalFleetHealthGate Export-AzureLocalFleetState Resume-AzureLocalFleetUpdate Stop-AzureLocalFleetUpdate Test-AzureLocalClusterHealth Get-AzureLocalFleetStatusData New-AzureLocalFleetStatusHtmlReport Test-AzureLocalUpdateScheduleAllowed

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

## Version 0.7.0 - Fleet-scale correctness, parallelism, and hardening

The jump from 0.6.5 to 0.7.0 reflects the scope of this release: correctness fixes for large
fleets (1500+ clusters), a shift to true parallel execution across all per-cluster read/write
paths, HTML report performance improvements, and a round of bug and security hardening driven
by a deep review of the module. No breaking public-surface changes; all new helpers are
private. Az CLI is retained as the ARM transport; a native Invoke-RestMethod port is
deliberately deferred to a future major release.

### Phase 1 - Critical correctness at scale
- Azure Resource Graph pagination: ARG queries now follow the continuation skip-token
 instead of being capped at the first 1000 results, so inventories of more than 1000
 clusters are no longer silently truncated.
- True parallel fleet execution: Invoke-AzureLocalFleetOperation, Get-AzureLocalFleetProgress,
 and Test-AzureLocalFleetHealthGate now use the shared parallel worker pool. -ThrottleLimit
 now controls concurrent API calls, not retry backoff. Default 4, range 1-16.

### Phase 2 - Performance
- Per-cluster read functions (readiness, health, update summary, available updates, tag
 writes) now run in parallel batches.
- HTML report renderer: pre-indexed lookups, encode-at-collection, and deduplicated portal
 URL construction. Roughly 60% faster render at 1500 clusters. UTF-8 output is now written
 without a BOM.
- Opt-in pass-through parameters on state-changing functions to avoid re-fetching data that
 was already collected earlier in the pipeline.

### Phase 3 - Bugs and strict-mode hardening
- All remaining ConvertFrom-Json call sites routed through Invoke-AzRestJson for uniform
 error handling.
- Null/empty guards on health failure and update-run aggregation paths.
- Deterministic secondary sort on update names that lack a parseable YYMM component, with a
 warning emitted instead of silent fallback.
- Per-job CSV logs merged at the end of parallel runs to eliminate line-interleaving under
 Add-Content concurrent writes.
- Robust tag property access for both Hashtable and PSCustomObject tag shapes.
- Unparseable UpdateWindow/UpdateExclusions tags are now treated as blocking unless -Force
 is specified.
- Stop-AzureLocalFleetUpdate and New-AzureLocalFleetStatusHtmlReport now support
 ShouldProcess (-WhatIf / -Confirm). Under -WhatIf, the HTML report still returns the
 composed string to the pipeline so callers can inspect or pipe it without writing to disk.

### Phase 4 - Security
- UpdateRingValue is whitelist-validated before KQL interpolation.
- CSV writer now escapes formula-leader characters (=, +, -, @, tab) and strips embedded
 CR/LF to prevent formula injection when opened in Excel.
- User-supplied output paths are resolved to absolute form, length-capped, and rejected if
 they contain traversal sequences when a relative root was expected.
- Az CLI output is scrubbed before being written to error logs so any accidental password
 or token echo is masked.
- Invoke-AzRestJson now handles mid-run token expiry: on 401 it refreshes the access token
 once and retries.

### Phase 5 - UX and schema refinements
- UpdateWindow tag separator changed from ':' to '_' between the day-spec and time range
 (e.g. "Mon-Fri_22:00-02:00" replaces "Mon-Fri:22:00-02:00"). Breaking for pre-release
 consumers only. Any cluster still on the old tag value will have its updates blocked
 until re-tagged; use Set-AzureLocalClusterUpdateRingTag -UpdateWindowValue to migrate.
- Test-AzureLocalUpdateScheduleAllowed now re-throws parser errors instead of swallowing
 them, so malformed schedule tags correctly reach the caller's fail-closed path.
- Fleet HTML report "Recent Update Run History": one row per cluster (the most recently
 started update), attempts aggregated within that update. New "Update Attempts" column
 (shown only when >1 attempt exists). Duration now uses HH:MM:SS format (survives summed
 multi-day totals) instead of fractional N.N hours.
- Fleet HTML report "Cluster Information" now includes a "Current SBE Version" column,
 propagated through Get-AzureLocalFleetStatusData and both GitHub Actions / Azure DevOps
 fleet-status pipeline YAMLs.
- Start-AzureLocalClusterUpdate -WhatIf output no longer polluted by internal Write-Log /
 CSV / log-folder side effects; only the ARM apply/action call is previewed. -WhatIf runs
 now count as "WouldUpdate" in the final summary.
- New private helper Format-AzLocalDurationHuman (central duration renderer, emits
 "1 hour 23 minutes" style for per-run outputs).

### Notes
- No breaking changes to exported functions or parameter sets.
- Pester suite: 261/261 passing.
- Az CLI remains the ARM transport. Native Invoke-RestMethod migration is explicitly
 out of scope for 0.7.0.

For release notes on previous versions (0.6.5 and earlier), see:
https://github.com/NeilBird/Azure-Local/blob/main/AzStackHci.ManageUpdates/CHANGELOG.md

FileList

  • AzStackHci.ManageUpdates.nuspec
  • Automation-Pipeline-Examples\azure-devops\assess-update-readiness.yml
  • Automation-Pipeline-Examples\azure-devops\inventory-clusters.yml
  • Automation-Pipeline-Examples\github-actions\apply-updates.yml
  • Automation-Pipeline-Examples\github-actions\assess-update-readiness.yml
  • Automation-Pipeline-Examples\github-actions\fleet-update-status.yml
  • Automation-Pipeline-Examples\github-actions\inventory-clusters.yml
  • Automation-Pipeline-Examples\github-actions\manage-updatering-tags.yml
  • Images\azurelocal-instance.svg
  • AzStackHci.ManageUpdates.psm1
  • example-update-request.json
  • Automation-Pipeline-Examples\README.md
  • Automation-Pipeline-Examples\azure-devops\fleet-update-status.yml
  • Automation-Pipeline-Examples\azure-devops\manage-updatering-tags.yml
  • AzStackHci.ManageUpdates.psd1
  • CHANGELOG.md
  • README.md
  • Automation-Pipeline-Examples\azure-devops\apply-updates.yml

Version History

Version Downloads Last updated
0.7.0 (current version) 9 4/24/2026
0.6.5 8 4/23/2026
0.6.4 9 4/17/2026
0.6.3 7 4/15/2026
0.6.2 3 4/15/2026
0.6.1 11 4/10/2026
0.6.0 5 4/9/2026
0.5.9 9 4/8/2026
0.5.8 9 3/16/2026
0.5.7 23 1/29/2026
0.5.6 7 1/29/2026
Show more