Onedrive-Removal

PowerShell script to remove OneDrive from Windows 10/11

Stars
0
Committers
2

OneDrive Removal Script

A PowerShell script to completely remove OneDrive from Windows, including all associated files, folders, registry entries, and scheduled tasks.

Prerequisites

  • This script requires administrator privileges to run properly.
  • Ensure PowerShell 5.1 or higher is installed on your system.

Usage

  1. Run PowerShell as Administrator:

    • Press Win + X and choose Windows PowerShell (Admin).
  2. Execute the following commands:

    Set-ExecutionPolicy Bypass -Scope Process -Force
    iwr -useb https://itsnileshhere.github.io/Onedrive-Removal/onedriveRemovalScript.ps1 | iex
    

Important Details

The script will:

  • Terminate OneDrive process.
  • Uninstall OneDrive from system.
  • Copy files from OneDrive to user profile folder.
  • Remove OneDrive leftovers.
  • Revert user folders back to their default locations.

Credits

Related Projects