You need to add the PowerShell Gallery repository first:
Register-PSRepository -Default
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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\1.0.0.1\PSModule.psm1:1772 char:21
PS C:\Windows\system32> Get-PSRepository
WARNING: Unable to find module repositories.
You need to add the PowerShell Gallery repository first:
Register-PSRepository -Default
The below fixed it
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Unregister-PSRepository -Name PSGallery
Register-PSRepository -Default
For anyone whom finds this in the future, you need to add the "-AllowPrerelease" flag.
"Acquiring prerelease packages requires adding -AllowPrerelease flag to the PowerShellGet commands Find-Module, Install-Module, Update-Module, and Save-Module. If the flag is not specified, prerelease packages will not be shown.
"
https://learn.microsoft.com/en-us/powershell/gallery/concepts/module-prerelease-support?view=powershellget-3.x
The below should fix it, let me try it
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Unregister-PSRepository -Name PSGallery
Register-PSRepository -Default