1. Create a batch script. Insert the following lines in i.e tempinternet.bat

 

rd /s /q "%temp%"

mkdir "%temp%"

 

2. Place the script in a commonly accessible network share or sysvol folder on the DC.

3. Open the group policy and select Computer Configuration --> Windows Settings --> Scripts --> Log-Off or Shutdown. Add a reference to the script.

 

AD Example

Thank you to Rene Hunsicker for her email on this. If you have a suggestion like Rene had, send it to me. If I use it I will be sure to give you honorable mention. Send supporting documentation please.