This C# console application resets the group policies on a Windows client to their default settings. It also writes an informational event to the Event Viewer.
- Windows operating system
- .NET 6 runtime installed on the target machine
- Administrator privileges
- Open the solution file in Visual Studio 2022 or later.
- Build the solution in Release mode.
Alternatively, you can build the solution from the command line using the following command:
dotnet build --configuration Release
- Open an elevated Command Prompt or PowerShell console (Run as Administrator).
- Navigate to the directory containing the compiled executable.
- Run the application using the following command:
ResetGroupPolicy.exe [--verbose] [--help]
--verbose
: Enable verbose logging. When this option is used, the application will print detailed information about its progress to the console.--help
: Show a help message with a description of the command-line options.
To run the application with verbose logging, use the following command:
ResetGroupPolicy.exe --verbose