|
1 | | -[](https://ko-fi.com/asheroto) |
| 1 | +[](https://github.com/asheroto/UninstallOneDrive/releases) |
| 2 | +[](https://github.com/asheroto/UninstallOneDrive/releases) |
| 3 | +[](https://github.com/sponsors/asheroto?frequency=one-time&sponsor=asheroto) |
| 4 | +<a href="https://ko-fi.com/asheroto"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Ko-Fi Button" height="20px"></a> |
| 5 | +<a href="https://www.buymeacoffee.com/asheroto"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=seb6596&button_colour=FFDD00&font_colour=000000&font_family=Lato&outline_colour=000000&coffee_colour=ffffff](https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee&emoji=&slug=asheroto&button_colour=FFDD00&font_colour=000000&font_family=Lato&outline_colour=000000&coffee_colour=ffffff)" height="40px"></a> |
2 | 6 |
|
3 | 7 | # UninstallOneDrive |
4 | 8 |
|
5 | | -This script will uninstall OneDrive from all locations in a few seconds. |
| 9 | +This script quickly takes care of uninstalling OneDrive from various locations. It also cleans up related registry keys and scheduled tasks in just a few seconds. |
6 | 10 |
|
7 | | -# Install |
8 | | -On any Windows machine, open PowerShell as Administrator and type... |
| 11 | +## Setup |
| 12 | + |
| 13 | +**Note:** For a stable experience, use one of the methods listed below (#1, #2, or #3) to fetch the latest version. **Using the version directly from the GitHub repository is not advised**, as it could be under active development and not fully stable. |
| 14 | + |
| 15 | +### Method 1 - PowerShell Gallery |
| 16 | + |
| 17 | +**This is the recommended method, because it always gets the public release that has been tested, it's easy to remember, and supports all parameters.** |
| 18 | + |
| 19 | +Open PowerShell as Administrator and type |
9 | 20 |
|
10 | 21 | ```powershell |
11 | 22 | Install-Script UninstallOneDrive -Force |
12 | 23 | ``` |
13 | 24 |
|
14 | | -And accept the prompts. |
| 25 | +Follow the prompts to complete the installation (you can tap `A` to accept all prompts or `Y` to select them individually. |
15 | 26 |
|
16 | | -This script is published on [PowerShell Gallery](https://www.powershellgallery.com/packages/UninstallOneDrive). |
| 27 | +**Note:** `-Force` is optional but recommended, as it will force the script to update if it is outdated. If you do not use `-Force`, it will _not_ overwrite the script if outdated. |
17 | 28 |
|
18 | | -The code is signed, so if you want to change it, just removed the `# SIG # Begin signature block` line and everything beneath it. |
19 | | - |
20 | | -# Usage |
21 | | -To use, type... |
| 29 | +#### Usage |
22 | 30 |
|
23 | 31 | ```powershell |
24 | 32 | UninstallOneDrive |
| 33 | +``` |
| 34 | + |
| 35 | +If `UninstallOneDrive` is already installed, you can use the `-Force` parameter to force the script to run anyway. |
| 36 | + |
| 37 | +The script is published on [PowerShell Gallery](https://www.powershellgallery.com/packages/UninstallOneDrive) under `UninstallOneDrive`. |
| 38 | + |
| 39 | +#### Tip - How to trust PSGallery |
| 40 | + |
| 41 | +If you want to trust PSGallery so you aren't prompted each time you run this command, or if you're scripting this and want to ensure the script isn't interrupted the first time it runs... |
| 42 | + |
| 43 | +```powershell |
| 44 | +Install-PackageProvider -Name "NuGet" -Force |
| 45 | +Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted |
| 46 | +``` |
| 47 | + |
| 48 | +### Method 2 - One Line Command (Runs Immediately) |
| 49 | + |
| 50 | +The URL [asheroto.com/uninstallonedrive](https://asheroto.com/uninstallonedrive) always redirects to the [latest code-signed release](https://github.com/asheroto/UninstallOneDrive/releases/latest/download/UninstallOneDrive.ps1) of the script. |
| 51 | + |
| 52 | +If you just need to run the basic script without any parameters, you can use the following one-line command: |
| 53 | + |
| 54 | +```powershell |
| 55 | +irm asheroto.com/UninstallOneDrive | iex |
| 56 | +``` |
| 57 | + |
| 58 | +### Method 3 - Download Locally and Run |
| 59 | + |
| 60 | +As a more conventional approach, download the latest [UninstallOneDrive.ps1](https://github.com/asheroto/UninstallOneDrive/releases/latest/download/UninstallOneDrive.ps1) from [Releases](https://github.com/asheroto/UninstallOneDrive/releases), then run the script as follows: |
| 61 | + |
| 62 | +```powershell |
| 63 | +.\UninstallOneDrive.ps1 |
| 64 | +``` |
| 65 | + |
| 66 | +## Parameters |
| 67 | + |
| 68 | +**No parameters are required** to run the script, but there are some optional parameters to use if needed. |
| 69 | + |
| 70 | +| Parameter | Description | |
| 71 | +| ----------------- | ------------------------------------------------------ | |
| 72 | +| `-CheckForUpdate` | Checks if there is an update available for the script. | |
| 73 | +| `-UpdateSelf` | Updates the script to the latest version. | |
| 74 | +| `-Version` | Displays the version of the script. | |
| 75 | +| `-Help` | Displays the full help information for the script. | |
| 76 | + |
| 77 | +### Example Parameters Usage |
| 78 | + |
| 79 | +```powershell |
| 80 | +UninstallOneDrive -UpdateSelf |
25 | 81 | ``` |
0 commit comments