Install Microsoft Graph PowerShell Module
- Set the execution policy to
unrestricted via the following command:
Set-ExecutionPolicy unrestricted
- Allow any prompts to install NuGet packages, run/execute scripts, etc.
- Run the following command to install the Microsoft Graph PowerShell module:
Install-Module Microsoft.Graph.Users
- Once the installation is complete, run the following command to import the module for use:
Import-Module Microsoft.Graph.Users
- Install the user actions module via the following command:
Install-Module Microsoft.Graph.Users.Actions
- Once the installation is complete, run the following command to import the module for use:
Import-Module Microsoft.Graph.Users.Actions
- Install the identity directory management module via the following command:
Install-Module Microsoft.Graph.Identity.DirectoryManagement
- Once the installation is complete, run the following command to import the module for use:
Import-Module Microsoft.Graph.Identity.DirectoryManagement
- Install the Groups component of the Graph module:
Install-Module Microsoft.Graph.Groups
- Once the installation is complete, run the following command to import the module for use:
Import-Module Microsoft.Graph.Groups
- Once all of these commands have been run successfully, the Microsoft Graph PowerShell Module has been installed.