I want to use a csv to import multiple licences at once

Rens Sergier 21 Reputation points
2021-04-03T21:22:46.163+00:00

hello i just created my own script to automate some things. i have just one question that i can't solve: this is my csv: userprincipalname,displayname,password,usagelocation,licenseassignment sandrine@emic.be,sanne,voka545464,be, my command: addpath = "c:\users\rens.sergier\desktop\addusers.csv" import-csv $addpath | foreach { new-msoluser -userprincipalname $.userprincipalname -displayname $.displayname -password $.password -usagelocation $.usagelocation -licenseassignment $_.licenseassignment -forcechangepassword $false} if i do it with 1 licensesku it worked fine but i want to find a way when it is also possible to assign more than 1 licencse to an user. i tried with an array in my csv file but that did not work can anybody help me?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,997 questions
{count} votes