After you use a user account that has an existing Windows 7, Windows 8, or Windows 8.1 profile to log on to a Windows 10-based computer for the first time, a “v5” version of the profile is created.
Todo: pull anything pages from http://oldwiki.mundy.co
Delprof2 deletes inactive Windows user profiles (profiles that are not currently loaded).
Delprof2 is syntax compatible with the original Delprof by Microsoft. Unlike the original it works on all versions of Windows
If possible, Delprof2 uses the backup and restore privileges to bypass security and delete even profiles the executing user does not
normally have access to.
Delprof2 has no problem whatsoever deleting files in very long paths (longer than MAX_PATH, 260 characters).
Delprof2 also cleans up stale ProfileList SID.bak registry entries, a common cause of temporary profiles.
Usage: delprof2 [/l] [/u] [/q] [/p] [/r] [/c:[\\]<computername>] [/d:<days> [/ntuserini]] [/ed:<pattern>] [/id:<pattern>] [/i]
/l List only, do not delete (what-if mode)/u Unattended (no confirmation) /q Quiet (no output and no confirmation) /p Prompt for confirmation before deleting each profile /r Delete local caches of roaming profiles only, not local profiles /c Delete on remote computer instead of local machine /d Delete only profiles not used in x days /ntuserini When determining profile age for /d, use the file NTUSER.INI instead of NTUSER.DAT for age calculation /ed Exclude profile directories whose name matches this pattern Wildcard characters * and ? can be used in the pattern May be used more than once and can be combined with /id /id Include only profile directories whose name matches this pattern Wildcard characters * and ? can be used in the pattern May be used more than once and can be combined with /ed /i Ignore errors, continue deleting</blockquote>
eg: first run with /l so that you can see who it's going to delete, then add exclusions, then run without /l:DelProf2.exe /l DelProf2.exe /l /ed:adm* /ed:*net* /ed:*services* DelProf2.exe /ed:adm* /ed:*net* /ed:*services*