Skip to content

Install Microsoft Graph PowerShell Module

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