Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 9c73a45

Browse files
authored
Add NuGet installation instructions (#315)
* Add NuGet installation instructions
1 parent 2973885 commit 9c73a45

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,25 @@ A commandline tool should work on any terminal. We recommend:
99
- PowerShell version 7.3.2
1010

1111
## Installation
12-
Download the CLI SDK to get started for
13-
Windows, Mac, or Linux here on the assets link of the latest release: [CLI SDK Download](https://github.com/microsoftgraph/msgraph-cli/releases)
1412

13+
### DotNet Tool
1514

16-
### Windows
15+
```
16+
dotnet tool install --global Microsoft.Graph.Cli --prerelease
17+
```
18+
19+
### Manual
20+
21+
To download the CLI SDK to get started for Windows, Mac, or Linux.
22+
here on the assets link of the latest release: [CLI SDK Download](https://github.com/microsoftgraph/msgraph-cli/releases)
23+
24+
25+
#### Windows
1726
1. Extract downloaded CLI tool for Windows to folder
1827
2. Execute program using **mgc** (on Windows CMD) or **./mgc** (on Windows PowerShell) command.
1928

2029

21-
#### Windows environment setup (Optional)
30+
##### Windows environment setup (Optional)
2231

2332
To allow executing the mgc command without prefixing it with `./`, you can add the executable's directory to the OS Path environment variable.
2433
On Windows PowerShell, you can add the current directory to the path by running:
@@ -50,7 +59,7 @@ You can find it by either using windows search (it appears as _view advanced sys
5059
> The Environment Variables screen should have 2 sections that both have a Path entry. The _User variables_ section adds to the current user's path and other users' environments should remain unchanged. The _System variables_ section will make the changes for all users in the computer.
5160
5261

53-
### MacOS
62+
#### MacOS
5463

5564
1. Download the CLI archive for your Mac.
5665
- If you have an M1 Mac computer, download the `msgraph-cli-osx-arm64...` package.
@@ -59,7 +68,7 @@ You can find it by either using windows search (it appears as _view advanced sys
5968
3. Open a terminal in the new folder
6069
4. Execute the program using **./mgc** command.
6170

62-
#### Mac environment setup (Optional)
71+
##### Mac environment setup (Optional)
6372

6473
If you'd like to run the CLI from any folder, you need to either update the PATH environment variable for your shell,
6574
or add a symbolic link to the CLI into a location in the PATH (e.g. /usr/bin). Adding a symbolic link will need
@@ -86,15 +95,15 @@ sudo ln -s [path-to-the-cli-folder]/mgc /usr/bin
8695
```
8796

8897

89-
### Linux
98+
#### Linux
9099

91100
Download from browser OR via Curl
92101

93102
``` bash
94103
curl -LO <link> && tar -xzf <filename>
95104
```
96105

97-
#### Linux (Ubuntu) environment setup (Required)
106+
##### Linux (Ubuntu) environment setup (Required)
98107

99108
The linux environment setup is similar to the Mac setup, but with one difference. For headless linux environments,
100109
there's an additional step to configure the keyring for access token encryption.
@@ -158,6 +167,14 @@ See the [shell script](docker/init.sh) used for docker in this repository
158167
Find docker instructions in the docker folder [here](docker)
159168

160169
## Uninstalling
170+
### Dotnet tool
171+
172+
```
173+
dotnet tool uninstall Microsoft.Graph.Cli
174+
```
175+
176+
### Manual
177+
161178
1. Delete the CLI installation folder
162179
2. If path enviroment variable had been set, remove it.
163180

0 commit comments

Comments
 (0)