Skip to content

Commit

Permalink
Added uninstall documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio0404 committed Oct 12, 2023
1 parent e3a00aa commit ae201df
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Uninstalling AzureAuth

We provide an uninstall script you can use to Uninstall AzureAuth. The script removes the default AzureAuth reference in the PATH and it will deletes the AzureAuth installation folder.

The script currently doesn't support uninstalling from custom locations. This is to avoid removing any potential files that are not safe to delete. If there are any potential installations in custom locations found in the PATH (installed through the `$AZUREAUTH_INSTALL_DIRECTORY` environment variable), a warning will be prompted showing its location. Installations in custom locations that are not listed in the PATH cannot be found and uninstalled.

## Usage

Run the following in PowerShell:

```
$script = "${env:TEMP}\uninstall.ps1"
$url = "https://raw.githubusercontent.com/AzureAD/microsoft-authentication-cli/main/install/uninstall.ps1"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest $url -OutFile $script; if ($?) { &$script }; if ($?) { rm $script }
```

## Note

* The script doesn't work for versions previous to AzureAuth 0.4.0
* The script won't work as intended if you try to uninstall right after installing because PATH changes from the installation won't take effect until after restarting PowerShell.

0 comments on commit ae201df

Please sign in to comment.