Syncing Azure AD with your on-premise AD:
You can use the Synchronization Service Manager GUI or PowerShell to integrate your Active Directory with Azure’s Active Directory.
To integrate it using PowerShell you need to install Azure Active Directory Connect, import the PowerShell module ADSync, and run the command “Start-AdSyncSchedule.”
Using PowerShell to connect to Exchange:
To connect to Exchange remotely using PowerShell, you first need to run PowerShell as Administrator. Then you need to run the command “Set-ExecutionPolicy RemoteSigned.” After that, “Y” for yes, when you’re asked if you want to change the execution policy.
Then run the command “$UserCredential = Get-Credential.”
Then run “$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https://outlook.office365...m/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection” and “Import-PSSession $Session.”
You can test whether or not it worked by running “Get-Mailbox -Filter '(RecipientTypeDetails -eq "RoomMailBox")'.”
References:
https://adamtheautomator.com/azure-ad-connect/ https://www.meetio.com/re...ge-online-powershell