Microsoft 365 Administrator Expert MS-102 Practice Question
You are designing a script to license 800 existing cloud-only users in Microsoft Entra ID. The UPNs are stored in C:\temp\upns.csv, which contains a column named userPrincipalName. You already connected to Microsoft Graph PowerShell and stored the Microsoft 365 E5 SKU ID in the variable $skuId. You must assign this license to every user using a single pipeline that relies only on currently supported modules. Which PowerShell command should you use?
The Microsoft Graph PowerShell SDK is the supported module for user licensing. Import-Csv delivers each UPN to the pipeline, and ForEach-Object invokes Set-MgUserLicense, adding the required SkuId while passing an empty array to -RemoveLicenses. The other options either call deprecated AzureAD/MSOnline cmdlets or misuse Update-MgUser, which cannot assign licenses directly.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Microsoft Graph PowerShell SDK?
Open an interactive chat with Bash
What is the purpose of the '-RemoveLicenses @()' parameter in Set-MgUserLicense?
Open an interactive chat with Bash
Why are AzureAD and MSOnline cmdlets considered deprecated?
Open an interactive chat with Bash
Microsoft 365 Administrator Expert MS-102
Deploy and manage a Microsoft 365 tenant
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .