Assign office 365 license

I have a script which adds an office 365 license to a user, how can I ammend the script so that it added two different AccountSkuID licenses?

$AccountSkuId = "ExitCodeZero:STANDARDWOFFPACK"
$UsageLocation = "GB"
$Users = Import-Csv c:\temp\userlist.csv
$Users | ForEach-Object {
Set-MsolUser -UserPrincipalName $_.UserPrincipalName -UsageLocation $UsageLocation
Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $AccountSkuId
}		
August 21st, 2015 4:38am

It should just be a comma separated string.

$AccountSkuId = "ExitCodeZero:STANDARDWOFFPACK,ExitCodeZero:OTHEROFFPACK"

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 5:25am

did not work at first but when I put each license in quotes it did so that you for your help

"ExitCodeZero:STANDARDWOFFPACK","ExitCodeZero:OTHEROFFPACK"

August 21st, 2015 5:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics