Install-Module Microsoft Graph PowerShell Module

Glenn Maxwell 10,106 Reputation points

Hi All

I am getting below error installing Microsoft.Graph powershell module please guide me

PS C:\Windows\system32> Install-Module Microsoft.Graph -Scope AllUsers
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Microsoft.Graph'. Try Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1772 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

PS C:\Windows\system32> Get-PSRepository
WARNING: Unable to find module repositories.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,506 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,354 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 94,521 Reputation points MVP

    You need to add the PowerShell Gallery repository first:

    Register-PSRepository -Default  
    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Glenn Maxwell 10,106 Reputation points

    The below fixed it

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Unregister-PSRepository -Name PSGallery
    Register-PSRepository -Default

    3 people found this answer helpful.
    0 comments No comments

  2. Glenn Maxwell 10,106 Reputation points


    0 comments No comments

  3. Glenn Maxwell 10,106 Reputation points

    The below should fix it, let me try it

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    Unregister-PSRepository -Name PSGallery
    Register-PSRepository -Default

    0 comments No comments