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 }`