you can use the Connect-MsolService
cmdlet. This cmdlet allows you to connect to the Microsoft Online Services, which includes Office 365.
Kindly go through the following Microsoft reference article:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been using the same script for the last 20 years. Recently it stopped working and says that the login does not work (it does work) Does anyone know if something here has changed? I am thinking that the website might be different but don't know where to even start. This is the login prompt for Office 365 account. Thank you for your help
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
you can use the Connect-MsolService
cmdlet. This cmdlet allows you to connect to the Microsoft Online Services, which includes Office 365.
Kindly go through the following Microsoft reference article:
Hi,
It is recommended to migrate to Microsoft Graph PowerShell. You can use Connect-MgGraph to connect to Microsoft Graph.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.