SOLVED

Read-Host not working with multiple input

Highlighted
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
Highlighted
Solution

Found it out, had to do it like this.

5.PNG

 

Highlighted

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

 

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

Highlighted

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