If you’re trying to install the MSOnline powershell module by running “Install-Module -Name MSOnline” and you’re getting the error “No match was found for the specified search criteria and module name ‘MSOnline'”, the commands listed below will fix the issue.
- Run the command: Get-PSRepository
- If you receive the output “WARNING: Unable to find module repositories”, then run the following command: Register-PSRepository-Default
- Then check the repository again by running Get-PSRepository
At this point, you should see the following output:

You should now be able to run Install-Module MSOnline.