Skip to content

cog425/RegistryCleanupTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠 Registry Cleanup Tool

PowerShell scripts for searching, backing up, deleting, and restoring Windows Registry keys. Designed for scenarios where orphaned registry entries (e.g., old organizations, OneDrive links, Teams cache) need to be cleaned up safely.


✅ Features

v1

  • Basic search for registry keys by keyword.
  • Export results to a text file.
  • Delete keys after confirmation.

v2

  • Added backup before deletion.
  • Created restore functionality using .reg files.
  • Mapping file for easy restore.

v3

  • Live progress updates during scanning.
  • Selective hive scanning (choose HKCU, HKLM, HKU, HKCR).
  • Streaming results for faster feedback.
  • Hash-based backup filenames to avoid invalid characters.
  • Mapping file for restore mode.
  • Interactive mode: Delete or Restore.

✅ How It Works

  • Delete Mode:

    • Scans selected registry hives for a keyword.
    • Streams results to an output file.
    • Backs up each key using hash-based filenames.
    • Creates a mapping file linking original path → backup file.
    • Prompts for deletion after backup.
  • Restore Mode:

    • Reads mapping file.
    • Imports each .reg backup file to restore keys.

✅ Usage

Prerequisites

  • Windows PowerShell 5.1 or PowerShell Core.
  • Run as Administrator.
  • Enable script execution:
    Set-ExecutionPolicy RemoteSigned

About

PowerShell scripts for registry cleanup and restore with iterative improvements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors