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].
- ForceChangePasswordNextSignIn
- Update-MgUser
- true
- New-MgUser
- Import-Csv
- AccountEnabled
- false
- Export-Csv
- foreach
- Get-MgUser
- Connect-MgGraph
- while
Correct answers
- Gap 1: Connect-MgGraph
- Gap 2: Import-Csv
- Gap 3: foreach
- Gap 4: New-MgUser
- Gap 5: ForceChangePasswordNextSignIn
- 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.