Drag a concept onto its matching description — or click a concept then click the description.
Connects to Azure AD
Connects to Exchange Online
Connects to MS Online (legacy)
Lists mailboxes
Resets a user's password
Match each PowerShell command to its function in Microsoft 365.
Drag a concept onto its matching description — or click a concept then click the description.
Connects to Azure AD
Connects to Exchange Online
Connects to MS Online (legacy)
Lists mailboxes
Resets a user's password
Answer choices
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Connect-ExchangeOnline: Connects to Exchange Online PowerShell
Correct matches: Connect-ExchangeOnline for Exchange Online, Get-Mailbox for mailbox properties, Get-MgUser for Microsoft Entra ID users. Common confusion: mixing Exchange and Microsoft Entra ID commands.
Answer analysis
For each option: why learners choose it and why it is or isn't the right answer here.
Connect-ExchangeOnline: Connects to Exchange Online PowerShell
Why this is correct
Connect-ExchangeOnline is the correct cmdlet for establishing a remote PowerShell session to Exchange Online. It connects to the Exchange Online endpoint (typically https://outlook.office365.com/powershell-liveid) and loads a set of Exchange-related cmdlets (like Get-Mailbox, Set-Mailbox, etc.) into the session. This cmdlet is part of the ExchangeOnlineManagement module and supports modern authentication (MFA, certificate-based authentication) to securely connect for administrative tasks. It is the standard entry point for any Exchange Online management via PowerShell.
Connect-ExchangeOnline: Connects to Microsoft Entra ID PowerShell
Why it's wrong here
This statement is incorrect because Connect-ExchangeOnline does not connect to Microsoft Entra ID (now Microsoft Entra ID) PowerShell. Microsoft Entra ID administrative tasks, such as managing user attributes or directory roles, require the Microsoft Graph PowerShell SDK (Connect-MgGraph) or the legacy AzureAD module (Connect-AzureAD). Connect-ExchangeOnline explicitly initializes a session to Exchange Online endpoints only, and its available cmdlets are scoped to Exchange Online objects like mailboxes, mail flows, and retention policies. Using it to connect to Microsoft Entra ID would fail because the session is not authenticated against the Microsoft Graph or Microsoft Entra ID endpoints.
Get-Mailbox: Retrieves mailbox properties and settings
Why this is correct
Get-Mailbox is the correct cmdlet to retrieve mailbox properties and settings for mailboxes in Exchange Online. It returns objects that contain attributes such as the mailbox's display name, primary SMTP address, forwarding address, litigation hold status, mailbox quota, and usage location, among others. This cmdlet can be used to list all mailboxes, filter them by property values, or retrieve a specific mailbox by identity. It requires an active session to Exchange Online (via Connect-ExchangeOnline) and is a core inventory and diagnostics tool for Exchange admin tasks.
Get-Mailbox: Retrieves user objects from Microsoft Entra ID
Why it's wrong here
This is incorrect because Get-Mailbox does not retrieve user objects from Microsoft Entra ID; it operates exclusively on mailbox objects within Exchange Online. Microsoft Entra ID user objects are directory identities that contain attributes like userPrincipalName, displayName, department, and directory role assignments, none of which are returned by Get-Mailbox. To retrieve user objects from Microsoft Entra ID via PowerShell, you should use Get-MgUser from the Microsoft Graph PowerShell SDK, which queries the /users endpoint of Microsoft Graph. While mailboxes are linked to Microsoft Entra ID user accounts, the Get-Mailbox output is scoped to the mailbox configuration, not the full directory identity.
Get-MgUser: Retrieves user objects from Microsoft Graph
Why this is correct
Get-MgUser is the correct cmdlet for retrieving user objects from Microsoft Entra ID through Microsoft Graph API. It maps to the Microsoft Graph /users endpoint and returns directory user objects, including properties such as id, userPrincipalName, displayName, mail, and assigned licenses or roles. This cmdlet is part of the Microsoft.Graph.Users module and requires an authenticated session via Connect-MgGraph with appropriate delegated or application permissions (e.g., User.Read.All). It is the modern replacement for the older AzureAD module and provides a consistent way to manage both Microsoft Entra ID users and their properties across Microsoft 365.
Go deeper
Learn chapter
Entra ID Administration
Key term
Exchange Online
Exchange Online is Microsoft's cloud-based email, calendar, and contact hosting service that is part of the Microsoft 365 suite, allowing organizations to manage corporate messaging without maintaining their own mail servers.
Key term
Mailbox
A mailbox is a storage location on a mail server where incoming and outgoing email messages are kept for a user or group.
About these practice questions
Courseiva writes every MS-102 question from scratch — 712 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MS-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MS-102 exam.