Fabrikam is onboarding 500 new employees simultaneously across three departments. The IT administrator has a CSV file containing each employee's display name, user principal name, department, and job title. The admin wants to create all 500 accounts in Microsoft Entra ID using Microsoft Graph PowerShell. Which approach correctly accomplishes this?
Select an answer to reveal the explanation.
Short Explanation
Use New-MgUser in a foreach loop over Import-Csv to create each new Entra ID account. It's the current Graph PowerShell way to make brand-new users, and you can pass DisplayName, UserPrincipalName, Department, JobTitle, and PasswordProfile. The retired MSOnline and AzureAD cmdlets don't count, and Set-MgUser only edits existing users.
Full Explanation
The correct approach is to use New-MgUser in a foreach loop reading from Import-Csv, passing parameters such as -DisplayName, -UserPrincipalName, -Department, -JobTitle, and a PasswordProfile object. New-MgUser is the Microsoft Graph PowerShell cmdlet for creating new user accounts in Microsoft Entra ID (formerly Azure AD). The standard bulk-creation pattern is: Import-Csv reads the CSV file and returns an array of objects; a foreach loop iterates over each row; New-MgUser is called with parameters like -DisplayName, -UserPrincipalName, -Department, -JobTitle, -AccountEnabled, and a -PasswordProfile hashtable that sets the initial password and forces a password change at next sign-in. The Add-MsolUser approach is wrong because Add-MsolUser belongs to the MSOnline PowerShell module, which Microsoft officially retired in March 2024. Using deprecated modules on the exam (and in production) is always wrong when a current Graph PowerShell equivalent exists. The Set-MgUser approach is wrong because Set-MgUser is used to modify properties of an already-existing user account. It cannot create new accounts. Running Set-MgUser against a UPN that doesn't exist yet will return an error, not create the account. The New-AzureADUser approach is wrong because New-AzureADUser belongs to the AzureAD PowerShell module, which Microsoft deprecated and retired alongside MSOnline. The Microsoft Graph PowerShell SDK (cmdlets prefixed Mg) is the official replacement for both the MSOnline and AzureAD modules. Exam tip: On AB-650 questions involving PowerShell and user management, any cmdlet from the MSOnline or AzureAD module families is virtually always a distractor. Correct answers will use the Mg-prefixed cmdlets from the Microsoft.Graph PowerShell module.