From ae201dfa596b50e1c7f92d069c7fa014b7e64fcb Mon Sep 17 00:00:00 2001 From: Emilio Alvear Cantu Date: Thu, 12 Oct 2023 16:11:53 -0700 Subject: [PATCH] Added uninstall documentation --- docs/uninstall.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/uninstall.md diff --git a/docs/uninstall.md b/docs/uninstall.md new file mode 100644 index 00000000..6b496c62 --- /dev/null +++ b/docs/uninstall.md @@ -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. \ No newline at end of file