This script resets the local group policy on Windows 7 by deleting the GroupPolicy and GroupPolicyUsers folders in the Windows System32 directory and running gpupdate to force an update of group policy settings. It was created by Shawn Brink and provides instructions on how to reset default local group policy through a tutorial on sevenforums.com.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
36 views
Reset Local Group: Windows 7
This script resets the local group policy on Windows 7 by deleting the GroupPolicy and GroupPolicyUsers folders in the Windows System32 directory and running gpupdate to force an update of group policy settings. It was created by Shawn Brink and provides instructions on how to reset default local group policy through a tutorial on sevenforums.com.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
RESET LOCAL GROUP: WINDOWS 7
' Created by: Shawn Brink
' http://www.sevenforums.com ' Tutorial: http://www.sevenforums.com/tutorials/214461-local-grouppolicy-reset-default.html If WScript.Arguments.Count = 0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1 Else set winsh = CreateObject("WScript.Shell") set winenv = winsh.Environment("Process") windir = winenv("WinDir") strPath = (WinDir & "\System32\GroupPolicy") DeleteFolder strPath Function DeleteFolder(strFolderPath) Dim objFSO, objFolder Set objFSO = CreateObject ("Scripting.FileSystemObject") If objFSO.FolderExists(strFolderPath) Then objFSO.DeleteFolder strFolderPath, True End If Set objFSO = Nothing End Function strPath = (WinDir & "\System32\GroupPolicyUsers") DeleteFolder strPath Function DeleteFolder(strFolderPath) Dim objFSO, objFolder Set objFSO = CreateObject ("Scripting.FileSystemObject") If objFSO.FolderExists(strFolderPath) Then objFSO.DeleteFolder strFolderPath, True End If Set objFSO = Nothing End Function winsh.Run "gpupdate /force", 0 End If