I'm looking for a way to bulk delete user profiles on Windows Server 2025. We've previously used DelProf2, but it seems to struggle with the registry path HKLMSOFTWAREMicrosoftWindows SearchUninstalledStoreApps. It appears there are user profile registry entries for each profile here, and by default, the Administrator doesn't have permission to delete them. I'm curious if this is a limitation with DelProf2 or if even the built-in Microsoft method in Advanced System Settings can handle it. What methods are you all using for bulk deleting user profiles on Windows 11 and Server 2025?
2 Answers
Just a quick tip: make sure users are signed out of their profiles instead of just shutting down the PC. That could help with the process dramatically!
Here's a method I’ve been using for cleanup:
```powershell
# Get All Profiles
$AllProfiles = Get-CimInstance -ClassName Win32_UserProfile
# Validate profile to remove
$AllProfiles | where localpath -match 'xxx' | select localpath, sid
# Remove validated profile
$AllProfiles | where localpath -match 'xxx' | Remove-CimInstance
```
Not sure how this connects to that registry key you mentioned, but scripting the cleanup should be straightforward! Let me know if you need help with it.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures