Shared computers, VDI environments, and RDS Terminal Servers constantly run out of disk space due to stale, inactive user profiles. Manually hunting down and deleting these profiles is a massive waste of time.
Automate your infrastructure storage maintenance using this native Group Policy Object (GPO) workflow to automatically wipe out inactive user profiles after a predetermined number of days.
🛠️ The Exact Group Policy Path:
• Navigate to: Computer Configuration ➡ Policies ➡ Administrative Templates ➡ System ➡ User Profiles
• Policy Name: Delete user profiles older than a specified number of days on system restart
⚙️ Configuration Blueprint:
Set the policy status to Enabled.
Define your retention window in the options box (e.g., enter 30 to delete profiles inactive for more than 30 days, or 1 or 2 depending on your environment needs).
Apply this GPO to the Computer Accounts (OU) where the cleanup needs to happen.
💡 Why this is critical: When a user logs off, Windows tracks their inactivity. Once the system restarts and detects that a profile has exceeded your predefined days, it cleanly purges it from the registry and disk—zero manual intervention required.
🔔 Subscribe to IT Battles for advanced enterprise infrastructure automation and Windows Server hacks.
👍 Leave a Like if this saved your server storage today!
#GroupPolicy #WindowsServer #ActiveDirectory #ITBattles #SysAdmin #StorageOptimization #WindowsServer2019 #HowTo