Skip to content

Remote Desktop Services

Get-RDSUsersFromUVHD.ps1

View in Gitea

Synopsis: Finds AD users based on UVHD (User Profile Disk) file names.

Scans a folder of UVHD disks, extracts the SID from each file name (format UVHD-S-1-5-21-*.vhdx), and looks up the matching user in AD.

Parameters:

Parameter Description
UVHDPath Path to the folder containing the UVHD files.
ExportCsv Optional path to export the results to a CSV file.

Examples:

.\Get-RDSUsersFromUVHD.ps1 -UVHDPath "\\fileserver\UPD$"
.\Get-RDSUsersFromUVHD.ps1 -UVHDPath "D:\UPD" -ExportCsv "C:\Temp\uvhd_users.csv"

Notes

Author: Petr Štěpán Created: 2026-07-21 Version: 1.0.0 Changelog: 1.0.0 - Initial version