AzStackHci.ManageUpdates
0.6.4
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
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
Dependencies
This module has no dependencies.
Release Notes
## Version 0.6.4 - Improved update readiness checks: HasPrerequisite, Az CLI Check & Fleet Status Data
### Security & Code Quality (2026-04-17 revision)
- SECURITY: Connect-AzureLocalServicePrincipal now accepts -ServicePrincipalSecret as [SecureString] (preferred) or [string] with a security warning. Plaintext secret memory is scrubbed after az login returns.
- NEW: Invoke-AzRestJson internal helper centralises az rest invocation with safe LASTEXITCODE checks and ConvertFrom-Json error handling.
- NEW: ConvertTo-AzLocalAdditionalProperties internal helper safely parses ARM additionalProperties (all 5 SBE-parse call sites now use it).
- FIXED: Get-AzureLocalFleetStatusData parallel Start-Job path - module path validated, accumulators use List[object] instead of O(n squared) += pattern, and failed jobs surface affected clusters via new FailedClusters result property.
- IMPROVED: Auth/Az CLI installer functions use Write-Log instead of Write-Host for CI-friendly logging.
- IMPROVED: Test-AzCliAvailable MSI install uses 30-minute timeout to prevent indefinite hangs.
- FIXED: Test-AzureLocalUpdateScheduleAllowed ExclusionActive return simplified (behaviour-preserving clarity fix).
### Inter-Function & Fleet-Scale Fixes (2026-04-17 revision)
- FIXED: Test-AzureLocalUpdateScheduleAllowed and Test-AzLocalUpdateWindow normalise non-UTC -TestTime (Local/Unspecified DateTimeKind) to UTC with a Verbose note. Previously callers passing Get-Date (local time) could silently evaluate the wrong maintenance-window hour/day.
- FIXED: Get-LatestUpdateByYYMM now emits a Verbose warning when no input name matches Solution<XX>.<YYMM>.<build>.<rev>. Previously, when every input failed to parse, all entries mapped to YYMM=0 and the arbitrary first element of a stable sort was returned.
- IMPROVED: Get-AzureLocalAvailableUpdates -ClusterResourceId (SingleCluster) now prints banner + Summary + Format-Table, matching multi-cluster UX. Passing -Raw preserves the legacy silent behaviour for internal callers.
### Original 0.6.4 content
- NEW: Test-AzCliAvailable internal helper checks if Azure CLI (az) is installed before any az invocation
- NEW: Get-AzureLocalFleetStatusData function for efficient single-pass fleet data collection with parallel Start-Job support
- NEW: -ThrottleLimit parameter (default: 4, max: 8) splits cluster list into parallel batches via Start-Job
- NEW: -ExportPath exports fleet data as JSON artifact for CI/CD pipeline job passing
- NEW: -StatusData parameter on New-AzureLocalFleetStatusHtmlReport accepts pre-collected data to skip API calls
- NEW: Stable JSON schema (v1.0) with SchemaVersion, Timestamp, ModuleVersion, Scope, Readiness, ClusterDetails, LatestRuns, HealthResults
- IMPROVED: All per-update state filters now use module-level constants aligned with LENS workbook v0.8.6 states
- IMPROVED: ReadyToInstall state recognized alongside Ready across all functions
- IMPROVED: HasPrerequisite/SBE dependency awareness across Get-AzureLocalAvailableUpdates, Start-AzureLocalClusterUpdate, Get-AzureLocalClusterUpdateReadiness, Get-AzureLocalFleetStatusData
- PERF: New-AzureLocalFleetStatusHtmlReport uses single-pass data collection (~63% API call reduction)
- FIXED: Az CLI availability check prevents unhelpful CommandNotFoundException errors
- FIXED: 'Up to Date' counter now recognizes 'AppliedSuccessfully' state from ARM API
- FIXED: Recommended Update no longer shows the version a cluster is already on when state is AppliedSuccessfully/UpToDate
For release notes on previous versions (0.6.3 and earlier), see:
https://github.com/NeilBird/Azure-Local/blob/main/AzStackHci.ManageUpdates/CHANGELOG.md
FileList
- AzStackHci.ManageUpdates.nuspec
- AzStackHci.ManageUpdates.psd1
- 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\inventory-clusters.yml
- Automation-Pipeline-Examples\azure-devops\manage-updatering-tags.yml
- Automation-Pipeline-Examples\github-actions\apply-updates.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
- CHANGELOG.md
- README.md
- Automation-Pipeline-Examples\azure-devops\apply-updates.yml