Fix The ‘Install-Module’ command was found in the module ‘PowerShellGet’

Hi Everyone this is Prem, I have worked as Microsoft 365 support ambassador. In this blog I will share how to Fix The ‘Install-Module’ command was found in the module ‘PowerShellGet’, but the module could not be loaded. For more information, run ‘Import-Module PowerShellGet’ error.

 

This issue can occur when we are trying to connect to the powershell to office 365 services like Exchange online, Microsoft admin center, etc and we try to Install the respective module.

 

When we run the Install-Module command it gives us the error The ‘Install-Module’ command was found in the module ‘PowerShellGet’, but the module could not be loaded. For more information, run ‘Import-Module PowerShellGet’

 

Let se How we can fix The ‘Install-Module’ command was found in the module ‘PowerShellGet’, but the module could not be loaded error:

 

When connecting with PowerShell to any Office 365 service make sure the PowerShell is ran as an Administrator when launching:

 

Search for windows PowerShell on your computer and run it as an administrator: