-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3a00aa
commit ae201df
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |