Windows 2008 Group Poloicy Preferences

I'm creating a new Windows 2008 Group Policy Computer Preference to delete a number of TEMP file directories. I have set he preference type as to Replace and to purge all files. Will this run when the server is rebooted?? I want to know when the server will purge these files listed in my policy
LVL 20
Who is Participating?
AcklesConnect With a Mentor Commented:
There is a different approach, you can use PowerShell Script for this. Please see the link below which will tell you exactly how to achieve the script:

Since the path you mentioned is corresponding to Windows 7, then you definately have ISE enabled.
Considering this, it should just run.

Now, how to run a script on machine via GPP, please see below to execute the above script:

Please tell if you need some help or you are not comfortable with this approach?

It will run either when the policy refresh interval is reached I.e. group policy is updated or machine restart.
WHat exactly you want to achieve? Which location in AD you applied this setting? where do you want apply this policy? server or on client?

Here's how policies are applied in domain controller.
>Everything under the USER CONFIGURATION node is applied upon logging in.
>Everything under the COMPUTER CONFIGURATION node is applied prior to getting the login box (in other words, prior to being able to press ctrl alt del).

Now, if you apply a policy and don't want to logoff and back on again to have it apply, do the following to apply the policy immediately:
Go to START + RUN + type the following: CMD and press ENTER
At the command prompt type the following: gpupdate /force

By default, computer Group Policy is updated in the background every 90 minutes, with a random offset of 0 to 30 minutes.

Abhijit Waikar.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

To be 100% sure, just reboot the server.
There are many instances when gpupdate /force won't give you the desired results.

compdigit44Author Commented:
I want to delete all files in C:\windows\temp & %userprofile%\appdata\local\temp
compdigit44Author Commented:
I tried that and it doesn't work. when I use %userprofile%\appdata\local\temp" in the GP folder preferences I get the error in the event logs the servers can can find the Computer temp??????
All Courses

From novice to tech pro — start learning today.