forked from microsoftgraph/msgraph-sdk-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0-InstallModule.ps1
25 lines (16 loc) · 942 Bytes
/
0-InstallModule.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Installing the Module
# Installing the Graph PowerShell module with no previous versions installed
Install-module Microsoft.Graph
# If upgrading from our preview modules, run install-module with AllowClobber and Force parameter to avoid command name conflicts
Install-Module Microsoft.Graph -AllowClobber -Force
# Updating from an earlier version of MS Graph PowerShell installed from PS Gallery
Update-module Microsoft.Graph
# Uninstalling the old preview version, before installing the new
# Remove the main meta module
Uninstall-Module Microsoft.Graph
# Remove all the dependent modules
Get-InstalledModule Microsoft.Graph.* | %{ if($_.Name -ne "Microsoft.Graph.Authentication"){ Uninstall-Module $_.Name } }
# Update the authentication module from 0.1.5 to 0.2.0
Install-Module Microsoft.Graph.Authentication -Repository PSGallery -force
# Or uninstall the authentication module
Uninstall-Module Microsoft.Graph.Authentication