Skip to content

Commit

Permalink
Added uninstall script documentation (#343)
Browse files Browse the repository at this point in the history
* Added uninstall documentation

* Color coded code snippet

* Update docs/uninstall.md

Co-authored-by: Shalini Khare <[email protected]>

* Update docs/uninstall.md

Co-authored-by: Shalini Khare <[email protected]>

* updated ReadMe

* Applied changes from code review

* Removed Note section. Comments did not reflect script's actual behavior

---------

Co-authored-by: Shalini Khare <[email protected]>
  • Loading branch information
Emilio0404 and shalinikhare27 authored Oct 13, 2023
1 parent 484a146 commit 781a5fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Invoke-WebRequest $url -OutFile $script; if ($?) { &$script }; if ($?) { rm $scr
**Note**: The script does not signal currently running processes to update their environments, so you'll need to
relaunch applications before the `$PATH` changes take effect.

**Note**: Uninstalling can be done with the uninstallation script. [Read more](docs/uninstall.md)

## macOS

On macOS we provide a shell bootstrap script, which will download and extract the application to `$HOME/.azureauth`
Expand Down
16 changes: 16 additions & 0 deletions docs/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Uninstalling AzureAuth

The uninstall script can be used to uninstall AzureAuth (currently only available for Windows). The script removes the default AzureAuth reference in the PATH and 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 printed 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:

```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 }
```

0 comments on commit 781a5fe

Please sign in to comment.