Even so, we’ve found that profiles are still accumulating across machines, and occupying more space on the hosted desktops than we’d really prefer. So we had to come up with a way to get rid of these leftover profile remnants. That’s where Delprof.exe came in.
Great utility, yes, but almost useless in the logout script because it won’t delete the current user’s profile (as it’s still loaded at that point). We needed a different way of handling it, so I came up with this little batch file-wannabe that is scheduled to run from the VirtualCenter server on a nightly basis:dsquery computer “ou=Hosted Desktops,dc=example,dc=com” \
-o rdn > vdi-list.txt
sed -f stripquotes.sed vdi-list.txt > vdi-list2.txt
for /f “tokens=1” %1 in (vdi-list2.txt) do \
delprof.exe /q /i /c:\\%1 /d:1
There are millions of ways to management and contain the user profiles, here's one:
Read the rest.