VBS script to delete all the Windows 7 user profiles and user registry values when the PCs shut down
Posted on 2014-10-27
We have 4, IT suites and 40 PCs on each of IT rooms. On each PC many students login each day and log out. In the evening the PCs shutdown.
Please could someone post me a VBS script to delete all the Windows 7 profiles when the PCs shut down? I am planning to create GPO and point the script under- Computer Configuration-Policies-Scripts-Shutdown.
Also want to make sure that the script clears the registry values of the deleted profile, so that when the same user logs into the same PC next day, they don’t get a profile error message.
Also want exception for Administrator, All users, default user, public, and default on the script.
Once I get some tutorials I will copy the VBS script to the C:\users location and do a CScript from the command prompt to make sure it works and then copy to the GPO.
Any help will be really helpful, Thanks in advance.