the term ‘connect-msolservice’ is not recognized as the name of a cmdlet function
Step-1:
Open Windows PowerShell in administrator mode. Then run the following commands serially.
If you have installed already AzureAD PowerShell commands, then run the below command to uninstall.
uninstall-module AzureAD
Step-2:
Then run the below commands one by one.
install-module AzureAD
install-module AzureADPreview
install-module MSOnline
Step-3:
Then you can run the below command to connect to Azure from Powershell.
Import-Module MSOnline
$credentials = Get-Credential
Connect-MsolService -Credential $credentials
Comments