In need of a script for removing user folders older than 30 days (win7)
I am new to VB Scripting and am just learning a lot of the proper scripting. However, I am in need of a vbs that will go out delete user folders (the local ones in C:\users) from when they login and any other folders underneath that users folder. The trick is I need only the users that are 30 days or older to be deleted. So as an example, I have 10 users in the C:\user folder 3 of them have not logged in in over 30 days on this particular computer. I need those 3 users deleted to make spare room on the local machine. If anyone can point me in the correct direction it would be greatly appreciated.
June 29th, 2011 5:53pm

Hi, For a workaround, you may check the modified date of profiles' folder. If they are modified more than 30 days. You can use the command in the following link to delete users account. Then delete their profiles. http://support.microsoft.com/kb/251394 Regarding how to compose a script, please post the thread at http://social.technet.microsoft.com/Forums/en/ITCG/threads/ for help. Thanks for understanding.Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2011 11:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics