First install the Windows Management Framework 5.1 https://www.microsoft.com/en-us/download/details.aspx?id=54616
Microsoft 365 admin center
First, download “Microsoft Online Services Sign-In Assistant for IT Professionals RTW” from this link: https://www.microsoft.com/en-us/download/details.aspx?id=41950 Install it.
Now, if you want to connect to “Connect with the Microsoft Azure Active” do this:
Set-ExecutionPolicy RemoteSigned
Install-Module MSOnline
If you have a warning that inform you that you need to update, use this command:
Install-Module MSOnline -Force
In the case of error like this use this command:
[Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12
WARNING: Unable to download from URI ‘https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409’ to ”.
WARNING: Unable to download the list of available providers. Check your internet connection.
PackageManagement\Get-PackageProvider : Unable to find package provider ‘NuGet’. It may not be imported yet. Try
‘Get-PackageProvider -ListAvailable’.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 char:30
… tProvider = PackageManagement\Get-PackageProvider -Name $script:NuGet …
Now run the command
Connect-MsolService and fill with your ID and PW.
Skype for Business Online
First, download “Skype for Business Online, Windows PowerShell Module” from this link: https://www.microsoft.com/en-us/download/details.aspx?id=39366 Install it.
Now run the PowerShell with Administrative Rights
Run this command
Set-ExecutionPolicy RemoteSigned
import-Module SkypeOnlineConnector
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession
SharePoint Online
Run this command
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url https://<domainhost>-admin.sharepoint.com
Exchange Online
First way
Run this command:
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid/” -Credential $credential -Authentication “Basic” -AllowRedirection
and then
Import-PSSession $exchangeSession -DisableNameChecking
Second way
Install the module
Install-Module -Name ExchangeOnlineManagement
Run this command:
Connect-ExchangeOnline
Security & Compliance Center
Run this command:
$SccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication “Basic” -AllowRedirection
Import-PSSession $SccSession -Prefix cc
To list all SCC command, use this command:
Get-Command -Module tmp_lya*
TEAMS
Install-Module MicrosoftTeams
Connet to Teams:
Connect-MicrosoftTeams
Get the commands…
Get-Command -Module MicrosoftTeams