There are some ways to automate the collection of user data, installed software, printers, and even settings before a rebuild or replacement. You can approach this in two levels:
| Task |
What to Collect |
Possible Automation Approach |
| #1 Stray documents / user data |
Files on Desktop, Documents, Downloads, etc. |
PowerShell scripts or USMT scanstate |
| #2 Installed software |
Installed programs and version numbers |
PowerShell (Get-ItemProperty, WMI, or Win32_Product) |
| #3 Printers |
Installed printers + drivers + default printer |
PowerShell (Get-Printer, Get-PrintConfiguration) |
| Extra |
Browser favorites, Outlook signatures, network shares, etc. |
User State Migration Tool (USMT) or custom scripts |
Option 1 — Quick PowerShell-based Inventory (Fast to Deploy)
You can run this manually or remotely (e.g. via PSRemoting):
# Collect user data info, installed software, and printers
$UserProfile = [Environment]::GetFolderPath('UserProfile')
$OutputPath = "C:\Temp\UserInventory_$(hostname).txt"
# 1. Check for stray documents
"=== User Files Summary ===" | Out-File $OutputPath
Get-ChildItem -Path "$UserProfile\Desktop","$UserProfile\Documents","$UserProfile\Downloads" -Recurse -ErrorAction SilentlyContinue |
Where-Object { -not $_.PSIsContainer } |
Select-Object FullName, Length, LastWriteTime |
Out-File -Append $OutputPath
# 2. List installed software
"`n=== Installed Software ===" | Out-File -Append $OutputPath
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*,
HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object { $_.DisplayName } |
Select-Object DisplayName, DisplayVersion, Publisher |
Sort-Object DisplayName |
Out-File -Append $OutputPath
# 3. List printers
"`n=== Installed Printers ===" | Out-File -Append $OutputPath
Get-Printer | Select-Object Name, DriverName, PortName, Shared | Out-File -Append $OutputPath
# 4. Optional: capture some user settings
"`n=== User Settings (Registry) ===" | Out-File -Append $OutputPath
Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders |
Out-File -Append $OutputPath
Write-Host "Inventory written to $OutputPath"
This gives you a one-file report per computer that summarizes local files, software, and printers.
Option 2 — Use Microsoft's User State Migration Tool (USMT)
USMT is part of the Windows ADK, designed specifically for migrations like yours. It can:
- Collect user data (Desktop, Documents, AppData)
- Capture many app & system settings (Outlook profiles, IE favorites, etc.)
- Restore to a new machine
Example flow:
scanstate \\server\backup\$env:COMPUTERNAME /i:miguser.xml /i:migapp.xml /o /v:13 /c /l:scan.log
Then on the new machine:
loadstate \\server\backup\$env:COMPUTERNAME /i:miguser.xml /i:migapp.xml /v:13 /c /l:load.log
You can customize what gets included/excluded (printers, network drives, PST files, etc.) in the XML config.
Option 3 — Combine with inventory tools
If you're managing more machines at scale by using Intune or Endpoint Manager, these collect installed apps, hardware info, and can deploy scripts remotely.
Option 4 — Hybrid approach
- Run the PowerShell script above to capture a quick inventory.
- Run USMT (or a smaller robocopy-based script) to collect user data to a network share.
- After reinstall/replacement, restore the user profile and settings.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin