Forum Discussion
Jason Rhodes
Apr 14, 2017Iron Contributor
How to Administer client Office 365 accounts via PowerShell
Hi, I'd like to be able to manage all of our client Office 365 tenants via PowerShell. However when I try to login to PowerShell using the global admin account credentials, this does not allo...
Gorazd Nadižar
Apr 26, 2017Copper Contributor
Hi,
You can try this code, it works for me :
Set-ExecutionPolicy RemoteSigned $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session