Forum Discussion

AlexanderHolmeset's avatar
Apr 10, 2017

Read-Host not working with multiple input

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

 

  • 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.     

Resources