SOLVED

Read-Host not working with multiple input

MVP

Anyone got a explanation why this is happening? Also tried with " around the text in the input.

Read-host seems to work if i only input one thing like: Sway

Not working when inputting: sway,yammer_enterprise

 

1.PNG2.PNG4.PNG

3 Replies
best response confirmed by AlexanderHolmeset (MVP)
Solution

Found it out, had to do it like this.

5.PNG

 

You're passing a String value, it needs to be list. Try it like this:

 

$newSKU = New-MsolLicenseOptions -AccountSkuId tenant:SKUID -DisabledPlans $SelectedPlans.Split(",")

ah, so without the split powershell see it as one long object/value.    Thanks for that one.     

1 best response

Accepted Solutions
best response confirmed by AlexanderHolmeset (MVP)
Solution

Found it out, had to do it like this.

5.PNG

 

View solution in original post