PSCommand commandToRun = new PSCommand();
commandToRun.AddCommand(\"Connect-MsolService\");
commandToRun.AddParameter(\"Credential\", new PSCrede
All links to the Azure Active Directory Connection page now seem to be invalid.
I had an older version of Azure AD installed too, this is what worked for me. Install this.
Run these in an elevated PS session:
uninstall-module AzureAD # this may or may not be needed
install-module AzureAD
install-module AzureADPreview
install-module MSOnline
I was then able to log in and run what I needed.