I think, the default PS Repository is not being registered correctly. You can try the following to fix the issue
- Register PS Repository:
Register-PSRepository -Default
- Install MSOnline module again. If asked, press 'Yes to All' button to proceed the installation:
Install-Module -Name MSOnline
- Try finding the module again:
Get-PSRepository
--please don't forget to upvote
and Accept as answer
if the reply is helpful--