AzStackHci.DiagnosticSettings
0.6.5
Microsoft Azure Local - Diagnostics settings and connectivity tests support module
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2026 Microsoft Corporation. All rights reserved.
Package Details
Author(s)
- Microsoft Corporation
Tags
Microsoft AzStackHci Diagnostic Settings Connectivity AzureLocal
Functions
Get-AzStackHciMemoryDumpSettings Set-AzStackHciMemoryDumpSettings Restore-AzStackHciMemoryDumpSettings Get-AzStackHciPageFileSettings Restore-AzStackHciPageFileSettings Set-AzStackHciPageFileSettings Set-AzStackHciPageFileSettingsMinimal Get-AzStackHciUserModeCrashDumpSettings Set-AzStackHciUserModeCrashDumpSettings Restore-AzStackHciUserModeCrashDumpSettings Test-AzStackHciSSLInspection Send-ClusterPerformanceHistory Test-AzureLocalConnectivity Test-Layer7Connectivity Test-TCPConnectivity Get-AzStackHciOsConfigSettings Test-ArcMachinePrivateLinkScopeEnabled
PSEditions
Dependencies
This module has no dependencies.
Release Notes
## v0.6.5
### Module auto-update (Update-ModuleVersion, Test-AzureLocalConnectivity, Get-AzStackHciOsConfigSettings) improvements
- Update-ModuleVersion refactored: default path is now notify-only (prints PSGallery URL and returns $false); install gated behind new -InstallUpdate switch.
- Added -AutoUpdate switch to Test-AzureLocalConnectivity (opt-in install; default prints notice only)
- Added -NoAutoUpdate and -AutoUpdate switches to Get-AzStackHciOsConfigSettings with identical three-mode dispatch
### Get-AzStackHciOsConfigSettings — safety fixes
- Bug fix: -NoOutput no longer auto-answers "Y" to the delete-existing-ExportPath prompt. Now emits Write-Error with actionable guidance (clean up the folder or pass a different -ExportPath) and returns without deleting.
- Timestamp precision bumped from yyyyMMdd-HHmm to yyyyMMdd-HHmmss — eliminates folder-name collisions on back-to-back runs within the same minute (which was the common trigger for the delete prompt)
- Dropped redundant -Confirm on Remove-Item (Y/N Read-Host above it is the proper control; -Confirm caused hangs in non-interactive hosts)
- Remote-node parent-folder cleanup now gated behind a ${ClusterName}_* prefix check; logs Write-Debug and skips if the parent leaf does not match
### Test-AzureLocalConnectivity — console output polish
- Download speed summary now shows "X.X Megabits/second (or higher)" consistently across console, HTML, CSV and JSON outputs; "Failed" sentinel handled separately so the label is never nonsense
- Console URL column in failed/successful/skipped tables now shows FQDN only (scheme, path and :port suffix stripped via existing Get-DomainFromURL helper) so Format-Table -AutoSize does not wrap on long URLs. HTML, CSV and JSON artifacts still emit the full URL exactly as tested. Wildcard URLs are unchanged.
### Global state: save & restore $ErrorActionPreference (Test-AzStackHciSSLInspection)
- Previously set $ErrorActionPreference = "Stop" in begin {} but never restored it; mutated the caller's session
- Now captures the caller's value in begin, wraps process in try/finally, restores in finally
### Port constants (Test-AzureLocalConnectivity, wildcard/subdomain exceptions)
- Replaced hardcoded 443/80 literals with $script:PORT_HTTPS / $script:PORT_HTTP
### Global state: save & restore ServicePointManager settings (Test-Layer7Connectivity, Test-AzureLocalConnectivity)
- SecurityProtocol and ServerCertificateValidationCallback are now captured in begin/process and restored in finally
- Prevents mutating process-wide TLS / cert-validation state for other modules sharing the same session
- TLS 1.2 is now added with -bor so existing TLS 1.3 support is preserved
- Redirect Location header parse is now null/empty-guarded (replaces .Substring(0,1))
- Progress bars are cleared on function exit
### Backup file integrity (Memory Dump & UserMode Crash Dump settings)
- Backups now include BackupSchemaVersion and a Checksum (SHA-256 of the canonical JSON payload)
- Restore functions verify the checksum before applying settings and abort on mismatch (tamper/corruption detection)
- Pre-v0.6.5 backups without a Checksum field are accepted with a Write-Warning
### Module version check (Get-LatestModuleVersion, Update-ModuleVersion)
- Background Find-Module job now verifies termination after Remove-Job; emits a warning if the job lingered
- Get-Module -ListAvailable results are now force-cast to arrays for consistent .Count / indexing behaviour
- Stale-module cleanup ($StaleVersions) force-cast to array to avoid silent failures on single-result cases
### Empty catch blocks — diagnostic breadcrumbs
- Converted empty catch { } blocks to catch { Write-Debug "..." } across MemoryDumpSettings, OsConfigSettings, UserModeCrashDumpSettings
- Customers can now get diagnostic traces on rollback failures and missing cluster groups via -Debug
### Unit tests
- Added "Backup file SHA-256 checksum" Describe block — canonical hashing, tamper detection, legacy-format handling
- Added "Remove-PIIFromTranscriptFile return value" Describe block — verifies the new return contract
- Skipped 4 Get-LatestModuleVersion tests that exercise removed unlisted-probing logic and mocks that do not propagate into Start-Job child processes (documented inline with -Skip reason)
- Fixed Update-ModuleVersion stale-cleanup test to use a path matching the WindowsPowerShell\Modules safety regex
## v0.6.4
### Bug Fixes
- Test-NTPConnectivity: fixed NullArray exception extracting NTP server IP from w32tm.exe output. `-match` on a string array filters elements but does NOT populate `$Matches`, so `$Matches[1]` threw at runtime. Fix joins the array into a single string before matching: `($ntpResult -join "`n") -match '\[([^\]]+)\]'`.
- Update-ModuleVersion: fixed false "Update may be incomplete" warning during auto-update. `Get-Module -Name <module>` can return multiple entries when nested modules are loaded, making `.Version` an `Object[]` that never equals the target `[version]`. Now selects the highest version entry.
### Tests
- Added regression tests documenting `-match`/`$Matches` array vs string behaviour and verifying Test-NTPConnectivity IP extraction against realistic multi-line w32tm.exe output.
## v0.6.3
### Set-AzStackHciPageFileSettingsMinimal (renamed)
- Renamed from Set-AzStackHciPageFileMinimumSettings for consistency with other function names
### Set-AzStackHciMemoryDumpSettings — KernelDump Parameter Sets
- Replaced AzureLocal parameter set with KernelDump and KernelDumpDedicated sets
- Added -KernelDump mandatory switch for CrashDumpEnabled=2 (Kernel Memory Dump)
- Added -DumpFilePath optional parameter (default C:\Windows\MEMORY.DMP) with drive and space validation
- -DedicatedDumpFileDriveLetter is now mandatory in KernelDumpDedicated set (mutually exclusive with -DumpFilePath)
- Updated cluster scriptblock to support all parameter set variations
### Get-AzStackHciOsConfigSettings — PassThru Support
- Added -PassThru switch: returns PSCustomObject with JSON health summary for programmatic consumption
- Enables silent automation: $results = Get-AzStackHciOsConfigSettings -Scope Cluster -NoOutput -PassThru
- Returned object includes all health checks plus HTMLReportPath and JSONReportPath
### Test-AzureLocalConnectivity — Tiered RFC1918 Private Link Detection
- RFC1918 detection now uses three-tier classification instead of one-size-fits-all warning
- Tier 1 (Red/Critical): Arc endpoints (*.his.arc.azure.com, *.guestconfiguration.azure.com, *.dp.kubernetesconfiguration.azure.com) — NOT SUPPORTED for Azure Local
- Tier 2 (Yellow/Warning): PaaS Private Link endpoints (Key Vault, Storage, ACR, SQL, Site Recovery, Backup, Service Bus) — proxy bypass required
- Tier 3 (Yellow/Info): Other RFC1918 addresses — informational, check DNS configuration
- Added proxy-aware messaging: when proxy detected, advises adding Private Link FQDNs to proxy bypass/exception list
- Added PRIVATE_LINK_PROXY_BYPASS_ENDPOINTS constant for PaaS services supporting Private Link
- Expanded PRIVATE_LINK_CRITICAL_ENDPOINTS to include *.his.arc.azure.com and *.dp.kubernetesconfiguration.azure.com
- Result Note field now shows tier-specific prefix: "*Arc Private Link NOT SUPPORTED*", "*Private Link detected - add to proxy bypass list*", or "*Private Link detected*"
- Summary output lists affected endpoints per tier with actionable guidance
- Removed duplicate PrivateLink Note-update block that was running twice
- Reference: https://learn.microsoft.com/en-us/azure/azure-local/concepts/firewall-requirements
### Test-AzureLocalConnectivity — KeyVault Placeholder Handling
- Placeholder KeyVault endpoint shows Failed with descriptive Note, skips pointless DNS retries
- Redirect loop guard changed from -eq to -ge for defensive bounds checking
### Get-AzStackHciOsConfigSettings — Power Plan and Report Rollup Fixes
- Power Plan check now FAILs if active plan is not High Performance (not just cross-node consistency)
- Added Knowledge link for Power Plan: slow performance when using power plans other than High Performance
- Node tab Power Plan section shows error when not High Performance (rolls up to node/sub-tab indicators)
- Fixed Summary tab icon not reflecting NetworkATC or Key Services failures
### Bug Fixes
- Restore-AzStackHciMemoryDumpSettings: added bounds check before .Split()[1] in backup parsing (cluster + local)
- Set-AzStackHciMemoryDumpSettings: added -ErrorAction Stop to Get-CimInstance in cluster scriptblock
- Test-DownloadSpeedParallel: HttpWebResponse range probe closed in finally block (fixed socket leak)
- Add-RedirectedUrlToResults: redirect Note now recorded even when original Note is empty
- Test-AzureLocalConnectivity: certificate chain .ChainElements.Count guard before indexing
- Test-Layer7Connectivity: HttpWebResponse disposed in finally block; Headers["Location"] syntax fixed
- Import-Csv failure on malformed GitHub markdown now emits warning instead of silent empty results
- Separated CERT_CAPTURE_TIMEOUT_TICKS (15s) from HTTP_TIMEOUT_SEC (60s)
For full version history (including v0.6.2 and earlier) see CHANGELOG.md shipped with this module.
FileList
- AzStackHci.DiagnosticSettings.nuspec
- CHANGELOG.md
- GitHub-URI-Cache_2026-04-14\canadacentral-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\japaneast-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\usgovvirginia-hci-endpoints.md
- Private\AzStackHci.Constants.ps1
- Private\AzStackHci.Layer7.Helpers.ps1
- Private\AzStackHci.Network.Helpers.ps1
- Private\AzStackHci.Results.Helpers.ps1
- Private\AzStackHci.WildcardAndSubdomain.Helpers.ps1
- Public\AzStackHci.ConnectivityTests.ps1
- Public\AzStackHci.OsConfigSettings.ps1
- Public\AzStackHci.PrivateLinkScope.ps1
- Public\AzStackHci.UserModeCrashDumpSettings.ps1
- GitHub-URI-Cache_2026-04-14\OEMEndpoints\DellAzureLocalEndpoints.md
- GitHub-URI-Cache_2026-04-14\OEMEndpoints\HPEAzureLocalEndpoints.md
- AzStackHci.DiagnosticSettings.psd1
- README.md
- GitHub-URI-Cache_2026-04-14\eastus-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\southcentralus-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\westeurope-hci-endpoints.md
- Private\AzStackHci.DNS.Helpers.ps1
- Private\AzStackHci.MemoryDump.Helpers.ps1
- Private\AzStackHci.OsConfigReport.Helpers.ps1
- Private\AzStackHci.Utility.Helpers.ps1
- Public\AzStackHci.ClusterPerformance.ps1
- Public\AzStackHci.MemoryDumpSettings.ps1
- Public\AzStackHci.PageFileSettings.ps1
- Public\AzStackHci.SSLInspection.ps1
- GitHub-URI-Cache_2026-04-14\OEMEndpoints\DataOnAzureLocalEndpoints.md
- GitHub-URI-Cache_2026-04-14\OEMEndpoints\HitachiAzureLocalEndpoints.md
- GitHub-URI-Cache_2026-04-14\OEMEndpoints\LenovoAzureLocalEndpoints.md
- AzStackHci.DiagnosticSettings.psm1
- GitHub-URI-Cache_2026-04-14\AustraliaEast-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\IndiaCentral-hci-endpoints.md
- GitHub-URI-Cache_2026-04-14\southeastasia-hci-endpoints.md
- Private\AzStackHci.Connectivity.Helpers.ps1
- Private\AzStackHci.HardwareOEM.Helpers.ps1
- Private\AzStackHci.ModuleManagement.Helpers.ps1
- .signature.p7s