This repository contains two PowerShell-based tools (one GUI, one CLI) for managing and removing inactive local Windows user profiles. These tools are designed for IT administrators who manage shared workstations, lab environments, terminal servers, or enterprise devices where inactive profiles consume unnecessary disk space.
Deleting a profile permanently removes:
- User files
- AppData
- Desktop/Documents
- Registry profile entries
Better code in the main script
GUI (PsGuiRolf) : Windows PowerShell 5.1 or PowerShell 7+
CLI (PsRolfCli) : PowerShell 7.0 or later (requires -Version 7.0)
Permissions : Administrator
Remote operations require WinRM (WSMan) or DCOM/WMI access and rights.
The scripts are divided into:
- GUI version (PsGuiRolf) for interactive administration.
XAML GUI for local and remote profile cleanup
Windows PowerShell : 5.1 or 7+
Permissions : Administrator
Runs on win 11, Remove related registry entries under: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
CLI Parameter - Option change
$DaysFilterAccounts = (Get-Date).AddDays(-180)
- CLI version (PsRolfCli) for automated or scheduled execution :
Modern CIM-based inactive profile cleanup ( CIM-based profile management )
Windows PowerShell : 7.0 or later
Permissions : Administrator
Runs on win 11, Remove related registry entries under: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
- Default exclusions:
- Administrator
- Default
- Default User
- Public
- WDAGUtilityAccount
`PsGuiRolf - Win11` is the next-generation GUI where we go from WPF to XAML GUI application for managing local and remote Windows user profiles.
- XAML interface
- CIM operations
- WSMan → DCOM fallback
- Improved safety controls
- Better logging and exporting
It is designed for enterprise administration and modern Windows environments.

