Skip to content

Conversation

@Handover2AI-byExistence
Copy link
Contributor

Summary

This PR introduces flexible Azure Virtual Desktop (AVD) device filtering to the Export-IntuneManagedDevices script.

What’s New

  • Added -AVDDevices switch to enable filtering for both AVD single-session and multi-session hosts.
  • Added -AVDUniqueIdentifier parameter to support tenant-specific naming conventions.
  • Default behavior filters AVD devices using model = "Virtual Machine".
  • When -AVDUniqueIdentifier is provided, the script filters devices by matching the identifier within deviceName.

Why This Matters

Intune does not consistently expose operatingSystemEdition for AVD hosts, making OS-based filtering unreliable.
This update provides a predictable and tenant-agnostic way to target AVD devices while still allowing precise overrides when naming conventions are available.

Backward Compatibility

  • No changes to default behavior unless -AVDDevices is explicitly used.
  • Existing exports and authentication flows remain unchanged.

Testing

  • Verified filtering using both default model-based logic and custom name identifiers.
  • Confirmed correct device counts and expected output in JSON and CSV exports.

Gupta added 2 commits December 20, 2025 23:34
This commit introduces the new -AVDDevices switch and optional
-AVDUniqueIdentifier parameter.
When enabled, the script filters Intune devices using either a custom
device name identifier
or the default model = "Virtual Machine" logic. This allows exporting
both AVD single-session
and multi-session devices while keeping the default behavior unchanged.
@tim-atkinson tim-atkinson self-assigned this Jan 2, 2026
Copy link
Owner

@tim-atkinson tim-atkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ')' in function parameter list

@Handover2AI-byExistence
Copy link
Contributor Author

Missing ')' in function parameter list

Thanks for pointing that out. I understand the issue. I’ll update the PR accordingly.

@Handover2AI-byExistence
Copy link
Contributor Author

Missing ')' in function parameter list

Thanks for pointing that out. I understand the issue. I’ll update the PR accordingly.

Heads up: PSScriptAnalyzer may trigger a warning for a stray backtick in help block:

`   Enter <YourSecretId>

@tim-atkinson
Copy link
Owner

Missing ')' in function parameter list

Thanks for pointing that out. I understand the issue. I’ll update the PR accordingly.

Heads up: PSScriptAnalyzer may trigger a warning for a stray backtick in help block:

`   Enter <YourSecretId>

Thanks!

@tim-atkinson tim-atkinson merged commit eeeaaea into tim-atkinson:main Jan 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants