Use Powershell to analyze your Windows Profiles

PowerShell is the proverbial management Swiss army knife CMDline-style ( that’s because process explorer is my GUI Swiss army knife). Anyway, this article shows you how you can examine windows profiles using PowerShell. Cool stuff!

This is a powershell script to scan roaming profiles and generate a report with some important data. Because it’s a simple script, everybody is able to adjust this script to generate more data.

My script scans a profile share and automatically sends the data to an excel file. The data are summarized in the sheet “Summary” and contain the following positions:


  • Count of read profiles
    • Resolved and unresolved user account SID of the profile (it’s a good way to identify orphaned profiles)


General statistic information

  • Profile size average
  • Profile size min and max size
  • Profile file count average
  • Profile file min and max count
  • Size of ntuser.dat average
  • Size of ntuser.dat min and max


Important user data

  • Dictionary count and size, e.g. from Winword & Co
  • Count of saved passwords from Internet Explorer (best guess)
  • Count of cookies from Internet Explorer
  • Documents count and size (regular expression for file appendix like .doc)
  • PST file count and size
  • URL links
  • Everybody can expand the script for further data


Some charts about:

  • Range of profile sizes
  • Range of last save to the profiles
  • And more (if data exist in the user’s registry: last used language, Windows build)



Filed under: News Leave a comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.