Category Archives: PowerShell

How to Connect 21Vianet Hosted Office 365 Exchange Online using PowerShell

You can use the below cmdlets to Connect to 21Vianet Hosted Office365 Environment.

Open PowerShell in Elevated Mode and run the following commands,

Set-ExecutionPolicy -ExecutionPolicy unrestricted

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell -Credential $UserCredential -Authentication Basic Continue Reading

How to Install MSOnline Module and Connect Azure AD of 21Vianet China Cloud using PowerShell

Installing MSOnline is pretty Simple.

Open PowerShell in Elevated Mode and run the command,

Set-ExecutionPolicy -ExecutionPolicy unrestricted

Install-Modue -Name MSOnline

By Default, When you run the command

Connect-MsolService

You will get connected to Global Tenant ( Public Cloud)

What if … Continue Reading