You can use PowerShell to manage a lot of your administrative tasks such as user management and domain management.
The following is needed to set up power shell for this.
- MS Online Services Assistant needs to be downloaded and installed
- MS Online Module for PowerShell needs to be downloaded and installed
- Connect to Microsoft Online in PowerShell
Download MS Online Services Assistant
Download Online Module for PowerShell
Import-Module MSOnline
Connect to MS Online in PowerShell
Open a PowerShell session and import the MS Online Module using:
Login to Office365 Subscription
$urLogon = get-credential
Create New Session
$urPSSession = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $urLogon -Authentication Basic -AllowRedirection
Import Session:
Import-PSSession $urPSSession -AllowClobber
You can Set Execution Policy to RemoteSigned or ByPass to Run Unassigned Scripts
Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Connect to MsolService
Connect-MsolService –Credential $urLogon