Courseiva

MS-102 Deploy and manage a Microsoft 365 tenant Practice Question

Exhibit

Refer to the exhibit.

Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -ShowProgress $true
Get-Mailbox -ResultSize 10 | Select-Object DisplayName, RecipientTypeDetails, PrimarySmtpAddress

Refer to the exhibit. You run the PowerShell commands shown. The output displays 10 mailboxes with various RecipientTypeDetails, including UserMailbox, SharedMailbox, and RoomMailbox. You need to ensure that only user mailboxes are returned. What should you modify?

⚠ Common exam trap

Watch out — candidates often assume RecipientTypeDetails is a property that can be filtered by simply selecting it in Select-Object, but Select-Object only controls output columns, not which objects are retrieved; filtering must be done at the query level with -Filter.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Add the parameter -Filter "RecipientTypeDetails -eq 'UserMailbox'"

The Get-Mailbox cmdlet returns all mailbox types by default. To filter only user mailboxes, you must use the -Filter parameter with the condition 'RecipientTypeDetails -eq 'UserMailbox''. This ensures that only mailboxes with RecipientTypeDetails set to UserMailbox are returned, excluding shared, room, and other mailbox types.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use the -Properties parameter to specify additional attributes

    Why it's wrong here

    The -Properties parameter is used by Get-Recipient to retrieve additional attribute values that are not included in the default result set, such as CustomAttribute1 or ExtensionCustomAttribute1. It does not filter or narrow the objects returned; it only controls the amount of data displayed for each recipient. Since the goal is to limit the output to user mailboxes only, adding -Properties would not remove the unwanted non-user mailbox objects, and the filter would still be absent.

  • ✗

    Change RecipientTypeDetails to RecipientType in the Select-Object

    Why it's wrong here

    Changing the property referenced in Select-Object from RecipientTypeDetails to RecipientType only alters which property is displayed in the output table. RecipientType is a broad category (e.g., 'UserMailbox' vs 'MailUser'), while RecipientTypeDetails is more specific (e.g., 'UserMailbox' vs 'SharedMailbox'), but neither acts as a filter. Select-Object is a client-side cmdlet that reshapes output without affecting the underlying collection, so without a -Filter parameter or Where-Object, all recipient types would still be present.

  • ✓

    Add the parameter -Filter "RecipientTypeDetails -eq 'UserMailbox'"

    Why this is correct

    Adding the -Filter parameter with the OData query "RecipientTypeDetails -eq 'UserMailbox'" is the correct approach because it performs server-side filtering on the Get-Recipient cmdlet, returning only objects classified as user mailboxes. RecipientTypeDetails is a filterable property that distinguishes between mailbox types such as UserMailbox, SharedMailbox, RoomMailbox, and EquipmentMailbox. This ensures that the command returns exactly the intended result set, excluding all other recipient types, and is more efficient than pulling all recipients and filtering locally.

  • ✗

    Remove the -ShowProgress parameter

    Why it's wrong here

    The -ShowProgress parameter merely controls whether a progress bar is displayed while the cmdlet executes; it has no effect on the objects returned or their filtering. Removing it would not change the output—it would still return all recipients, including shared mailboxes, mail users, and distribution groups, which are not user mailboxes. Since the issue is the absence of a filter, removing -ShowProgress addresses only a cosmetic aspect and leaves the core problem unresolved.

About these practice questions

This MS-102 question is part of Courseiva's 712-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

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.