Skip to content

Add Azure Virtual Desktop (AVD) reporting support#27

Merged
tpcarman merged 2 commits into
AsBuiltReport:devfrom
cse-gh:feature/desktop-virtualization
Feb 5, 2026
Merged

Add Azure Virtual Desktop (AVD) reporting support#27
tpcarman merged 2 commits into
AsBuiltReport:devfrom
cse-gh:feature/desktop-virtualization

Conversation

@cse-gh
Copy link
Copy Markdown
Contributor

@cse-gh cse-gh commented Feb 3, 2026

Description

Adds a new Get-AbrAzDesktopVirtualization private function that documents Azure Virtual Desktop resources with four InfoLevel tiers:

InfoLevel Content
1 Summary tables for host pools, application groups, workspaces, scaling plans
2 Per-host-pool detail sections with custom RDP properties, agent update config, session host tables with health check styling
3 Registration token info (expiry/status), per-application-group detail with published applications for RemoteApp groups, per-scaling-plan schedule breakdowns (ramp-up/peak/ramp-down/off-peak)
4 Per-session-host vertical detail sections (OS version, VM resource ID, update state/error, expanded health checks), active user sessions per host pool

Health Checks

  • SessionHostHealth: Warning style when session host status is not "Available" or health checks report failures
  • DrainMode: Info style when session host has AllowNewSession = false
  • RegistrationExpiry: Warning style when registration token is expired
  • NoSessionHosts: Bold WARNING paragraph when a host pool has zero session hosts
  • HostPoolCapacity: Bold WARNING paragraph when total sessions >= max capacity across all hosts

Azure Cmdlets Used

  • Get-AzWvdHostPool, Get-AzWvdSessionHost, Get-AzWvdUserSession
  • Get-AzWvdApplicationGroup, Get-AzWvdApplication
  • Get-AzWvdWorkspace, Get-AzWvdScalingPlan

Files Changed

  1. New: Src/Private/Get-AbrAzDesktopVirtualization.ps1 — the AVD reporting function (~587 lines)
  2. Modified: Src/Public/Invoke-AsBuiltReport.Microsoft.Azure.ps1 — added DesktopVirtualization to $DefaultSectionOrder and $SectionFunctionMap
  3. Modified: AsBuiltReport.Microsoft.Azure.json — added DesktopVirtualization to SectionOrder, InfoLevel, and HealthCheck sections

Related Issue

New feature — no existing issue. Discussed with @tpcarman.

Motivation and Context

Azure Virtual Desktop is a significant Azure service not currently covered by the report. This addition provides comprehensive AVD documentation covering host pools, session hosts, application groups, workspaces, and scaling plans — consistent with the existing module patterns.

How Has This Been Tested?

  • Tested against a production Azure subscription with ~20 session hosts across multiple host pools
  • Validated all four InfoLevel tiers (1 through 4) produce correct HTML output
  • Tested with mix of running and deallocated session hosts
  • Tested with both Desktop and RemoteApp application group types
  • Health check styling confirmed working for unavailable hosts and drain mode
  • Tag display confirmed working with AVD's TrackedResourceTags type (uses .Keys and .AdditionalProperties[])

Requires Az.DesktopVirtualization module.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the contributing documentation.

New function Get-AbrAzDesktopVirtualization with 4 InfoLevel tiers:
- Level 1: Summary tables for host pools, app groups, workspaces, scaling plans
- Level 2: Per-host-pool detail sections with RDP properties, agent config, session host tables
- Level 3: Registration token info, per-app-group detail with published apps, scaling plan schedules
- Level 4: Per-session-host vertical detail, active user sessions per host pool

Health checks: SessionHostHealth, DrainMode, RegistrationExpiry, NoSessionHosts, HostPoolCapacity

Requires Az.DesktopVirtualization module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tpcarman tpcarman self-assigned this Feb 3, 2026
@tpcarman tpcarman added change request New feature or request in progress Assignee is currently focusing on this issue labels Feb 3, 2026
@tpcarman
Copy link
Copy Markdown
Contributor

tpcarman commented Feb 5, 2026

@cse-gh Thanks for this. It looks good. What's your comfort level for adding in language support for your function?

If you wish to add it then I will leave the PR open for the changes to be made. Or if you prefer, I can merge the PR and implement language support for you.

@cse-gh
Copy link
Copy Markdown
Contributor Author

cse-gh commented Feb 5, 2026

I can certainly give it a shot.

- Refactor Get-AbrAzDesktopVirtualization to use $LocalizedData pattern
- Add AVD strings to en-US and en-GB language files
- Add new es-ES, fr-FR, de-DE language files with:
  - Full module translations (all existing sections in English)
  - AVD section translated to Spanish, French, German respectively

Follows AsBuiltReport i18n framework per:
https://www.asbuiltreport.com/dev-guide/creating-a-report-module/#implementing-language-support-in-your-module

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cse-gh
Copy link
Copy Markdown
Contributor Author

cse-gh commented Feb 5, 2026

Updated pull request with language support.

Refactored Get-AbrAzDesktopVirtualization.ps1 to use $LocalizedData pattern
Added AVD strings to en-US and en-GB language files
Added new es-ES, fr-FR, de-DE language files (with AVD sections translated)

image image

@tpcarman tpcarman merged commit 738fdc5 into AsBuiltReport:dev Feb 5, 2026
1 of 5 checks passed
@cse-gh cse-gh deleted the feature/desktop-virtualization branch February 6, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change request New feature or request in progress Assignee is currently focusing on this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants