Clear Group Policy on Windows workstation.


@echo off

if exist "C:\Documents and Settings\%1\ntuser.dat" (

echo ** Attempting to load the user settings from %1 into the registry **
reg load HKU\Temp "C:\documents and settings\%1\ntuser.dat"

echo ** Registry hive has been loaded. **
echo ** Attempting to clear keys and re-create needed ones. **

reg delete "HKU\Temp\Software\Microsoft\Windows\CurrentVersion\Group Policy\History" /f
reg add "HKU\Temp\Software\Microsoft\Windows\CurrentVersion\Group Policy\History"
reg add "HKU\Temp\Software\Microsoft\Windows\CurrentVersion\Group Policy\History" /v DCName /t Reg_SZ /d %logonserver%.DOMAIN.COM

echo ** Keys have been cleared. Now unloading registry hive. **

reg unload HKU\Temp

echo ** Registry hive has been unloaded. **
echo ** Forcing Group Policy to reload on reboot. **

gpupdate /force /boot

echo ** Rebooting Computer **

shutdown -r -c "Shutting down PC to re-initialize group policy."

) ELSE (
echo ** ERROR: File not found. Are you sure you entered the username correctly? **
echo ** The username you entered was %1. **
echo ** The proper usage of this script: fixgp.bat username **
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ideal

Thank you for your detailed post. payday loans no direct deposit www.paydayloans-directlenders.com

respond this topic

All people deserve very good life and loans or auto loan will make it much better. Just because people's freedom is grounded on money.

Thanks for the good

Thanks for the good post.. easy payday loan

thank you very much for this

thank you very much for this nice post!! payday lenders direct

Thanks for sharing nice

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Technology Information