Forum Discussion
Unable to connect to Security & Compliance center using PowerShell
Hi,
I unable to connect to the Security and Compliance Center using the following commands:
$UserCredential = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
I have successfully connected to the Security and Compliance Center before using the same method and same account (Org Mgmt in Security and Compliance Permissions and Exchange Online ).
I can access other Office 365 services which suggests the password is correct.
I am given the following error:
Connecting to remote server failed with the following error message: Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
Can anyone advise how to remediate this issue?
Kind Regards,
Jordan
7 Replies
- Deleted
Note: I can access the Security and Compliance Center with the same account from the Office 365 Web Portal.
Do you happen to have Azure MFA enabled on that account? Or any other 2FA? If so, you need to use the ADAL-enabled module: https://technet.microsoft.com/en-us/library/mt811266(v=exchg.160).aspx
- Deleted
Hi Vasil,
No, I do not have 2FA set up for the account.
Thanks,
Jordan