Skip to content

Install Microsoft Graph PowerShell Module

  1. Set the execution policy to unrestricted via the following command:

    Set-ExecutionPolicy unrestricted
    
  2. Allow any prompts to install NuGet packages, run/execute scripts, etc.

  3. Run the following command to install the Microsoft Graph PowerShell module:

    Install-Module Microsoft.Graph.Users
    
  4. Once the installation is complete, run the following command to import the module for use:

    Import-Module Microsoft.Graph.Users
    
  5. Install the user actions module via the following command:

    Install-Module Microsoft.Graph.Users.Actions
    
  6. Once the installation is complete, run the following command to import the module for use:

    Import-Module Microsoft.Graph.Users.Actions
    
  7. Install the identity directory management module via the following command:

    Install-Module Microsoft.Graph.Identity.DirectoryManagement
    
  8. Once the installation is complete, run the following command to import the module for use:

    Import-Module Microsoft.Graph.Identity.DirectoryManagement
    
  9. Install the Groups component of the Graph module:

    Install-Module Microsoft.Graph.Groups
    
  10. Once the installation is complete, run the following command to import the module for use:

    Import-Module Microsoft.Graph.Groups
    
  11. Once all of these commands have been run successfully, the Microsoft Graph PowerShell Module has been installed.