Question 1 of 30
In a scenario where a Microsoft Teams administrator needs to manage user licenses for a large organization using PowerShell, they want to ensure that all users in a specific department are assigned the correct Teams licenses. The administrator has a CSV file containing the usernames and the corresponding license types. What is the most effective PowerShell command to achieve this task, considering that the administrator must first import the CSV file and then apply the licenses accordingly?
`Import-Csv "C:\Users\licenses.csv" | ForEach-Object { Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $_.LicenseType }`
`Get-Content "C:\Users\licenses.csv" | ForEach-Object { Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $_.LicenseType }`
`Import-Csv "C:\Users\licenses.csv" | ForEach-Object { New-MsolUser -UserPrincipalName $_.UserPrincipalName -LicenseType $_.LicenseType }`
`Import-Csv "C:\Users\licenses.csv" | ForEach-Object { Set-MsolUser -UserPrincipalName $_.UserPrincipalName -LicenseType $_.LicenseType }`

Preparing for Microsoft MS-740 Troubleshooting Microsoft Teams? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free