MSOL versus ExchangeOnlineManagement versus AzureAD versus AZ

CWT 391 Reputation points
2020-12-19T00:29:22.69+00:00

Good evening,

Looked on the forums here and plenty of other sites which I think has only confused things even more. That said, I did come across a reference (these forums) where someone responded and stated that the MSOL module/cmdlets were replaced with the AzureAD (aka Connect-AzureAD). Based on everything I have read, I believe the following is accurate. Am I wrong?

GOALS:
Managing AzureAD
Recommended module/cmdlets are AZ (aka Connect-AZAccount)

Managing O365
Recommended module/cmdlets are ExchangeOnlineManagement (aka Connect-ExchangeOnline)

  1. Wasn't the MSOL module/cmdlets replaced by ExchangeOnlineManagement?
  2. Wasn't the AzureAD module/cmdlets replaced by AZ?
  3. If the MSOL commands were replaced with ExchangeOnline, then what are the correct commands for all the articles that discuss Hybrid configurations, Modern Authentication, and Teams integration? Lots of these sites refer to MSOL commands only. How does everyone get around this?

Example sites:
https://learn.microsoft.com/en-us/microsoft-365/enterprise/configure-exchange-server-for-hybrid-modern-authentication?view=o365-worldwide#add-on-premises-web-service-urls-as-spns-in-azure-ad

https://learn.microsoft.com/en-us/exchange/configure-oauth-authentication-between-exchange-and-exchange-online-organizations-exchange-2013-help

In closing, if I could get the MSOL commands to run or actually import I'd be golden, but after installing the module my get-module command doesn't list it so I could then import them. Maybe this is where my attention needs to be?

Thanks all for any thoughts on this.

CWT

Also, there are a lot of references to MSOL commands related to this. Did the ExchangeOnlineManagement module replace that? If so, are the

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,202 questions
0 comments No comments
{count} votes

Accepted answer
  1. KyleXu-MSFT 26,396 Reputation points
    2020-12-21T06:14:02.287+00:00

    @CWT

    This one is hard or cannot to separate:

    Because Exchange online and Azure AD are two independent products, so they have their own management commands. At the same time, they are included in Office 365. So, sometime, you have need to manage them with Office 365 command.

    By the way, you don't need to remember a command is contained in which module, because if you run an Exchange command in Azure AD module, it will remind you that this is not an Azure AD command and tell you that you need to connect to Exchange online.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Vasil Michev 119.9K Reputation points MVP Volunteer Moderator
    2020-12-19T08:39:53.23+00:00

    The Az module is for Azure management, if you are planning to manage Azure AD as part of Office 365, stick to the Azure AD module. The MSOL module is the older version of the Azure AD module, sort of. It's not a direct replacement as some operations can still only be performed via MSOL.
    Exchange Online is totally separate from this, in no way it replaces any of the Azure AD related modules.

    0 comments No comments

  2. CWT 391 Reputation points
    2020-12-21T15:27:20.567+00:00

    @Vasil Michev & KyleXU

    So let me restate to confirm my understanding.

    3 module breakdown.

    1. The AZ module (Connect-AZAccount) allows us to manage Azure resources (vms, storage, subscriptoins etc) correct?
    2. The Exchange Online module (Connect-ExchangeOnline) allows us to manage mailboxes, configurations, connectors etc correct?
    3. AzureAD module (Connect-AzureAD) is a combination that can be used to manage Azure resources (VMs etc) along with O365 (Exchange related commands). Is this accurate?

    Thanks for the assistance with this.

    CWT


  3. CWT 391 Reputation points
    2020-12-28T23:24:54.267+00:00

    Just a quick follow up.

    After diving into my MSOL & AzureAD import issues I discovered something that I cannot recall ever running into. For whatever reason the default module location was not used meaning that when I installed these two modules, it did not place them C:\Windows\System32\WindowsPowerShell\v1.0\Modules or C:\Program Files\WindowsPowerShell\Modules. Feeling foolish I did not catch this, but for anyone that has issues importing these two modules, just use the following command to target the module directly.

    Import-Module "C:\PATH*.psd1"

    I still do not understand why the AZ and ExchangeOnlineManagement modules installed to a different location that powershell could just use so the import-module worked by default, but now at least I understand exactly what happened.

    Thanks again.

    CWT


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.