Skip to main content
  1. Public practice questions
  2. AB-650 Practice Exams | Microsoft 365 and AI Services Administrator Associate
  3. AB-650 Practice Exam 1

Question 19 — AB-650 Practice Exam 1

Fill in the blanks by selecting the correct options from the dropdown menus.

A Microsoft Graph PowerShell bulk-user script begins a Graph session with [Gap 1], loads CSV rows into objects by using [Gap 2], processes each imported row with a [Gap 3] loop, and creates each account by using [Gap 4]. To require a newly created user to replace the temporary password at the first sign-in, the password profile sets [Gap 5] to [Gap 6].

  1. ForceChangePasswordNextSignIn
  2. Update-MgUser
  3. true
  4. New-MgUser
  5. Import-Csv
  6. AccountEnabled
  7. false
  8. Export-Csv
  9. foreach
  10. Get-MgUser
  11. Connect-MgGraph
  12. while

Correct answers

  1. Gap 1: Connect-MgGraph
  2. Gap 2: Import-Csv
  3. Gap 3: foreach
  4. Gap 4: New-MgUser
  5. Gap 5: ForceChangePasswordNextSignIn
  6. Gap 6: true

Explanations

Correct:

Connect-MgGraph: This cmdlet establishes the Microsoft Graph PowerShell session in which the required permission scope is requested.

Import-Csv: This cmdlet reads the CSV file and converts its rows into objects that a PowerShell script can process.

foreach: This loop processes the imported objects one at a time, allowing the same account-creation operation to run for every CSV row.

New-MgUser: This cmdlet creates a Microsoft Entra user from values such as the display name, user principal name, mail nickname, and password profile.

ForceChangePasswordNextSignIn: This password-profile property controls whether the user must replace the supplied temporary password at the next sign-in.

$true: Assigning this Boolean value enables the forced password change behavior.

Wrong:

Get-MgUser: This cmdlet retrieves user objects rather than creating a new account from each CSV row.

Export-Csv: This cmdlet writes objects to a CSV file instead of loading CSV data for processing.

while: A while loop can repeat operations generally, but the CSV-driven pattern uses foreach to process each imported row directly.

Update-MgUser: This cmdlet modifies an existing Microsoft Entra user rather than creating a new one.

AccountEnabled: This parameter controls whether the new account is enabled; it does not define the required password change at first sign-in.

$false: This value would disable the forced password change rather than require it.