Msol license options broken with latest msol module.

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Dan Potter Dan Potter 3 months, 1 week ago.

  • Author
    Posts
  • #66882
    Profile photo of Dan Potter
    Dan Potter
    Participant

    While I'm waiting on MS I thought I'd ask if anyone else is experiencing the same issue.

    $disablecol #is array
    MCOVOICECONF_GOV
    SHAREPOINTWAC_GOV
    SHAREPOINTENTERPRISE_GOV

    $options = New-MsolLicenseOptions -AccountSkuId $accountsku -DisabledPlans $disablecol

    Error:

    Set-MsolUserLicense -UserPrincipalName $upn -LicenseOptions $options -ErrorAction stop
    Set-MsolUserLicense : Unable to assign this license because the license options are invalid.
    At line:1 char:1
    + Set-MsolUserLicense -UserPrincipalName $upn -LicenseOptions $options ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (:) [Set-MsolUserLicense], MicrosoftOnlineException
    + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.InvalidUserLicenseOptionException,Microsoft.O
    nline.Administration.Automation.SetUserLicense

    Strange output, broken machine

    $options.disabledserviceplans
    MCOVOICECONF_GOV SHAREPOINTWAC_GOV SHAREPOINTENTERPRISE_GOV

    Object type is the same on working/broken machines.

    $options.DisabledServicePlans.gettype()

    IsPublic IsSerial Name BaseType
    ——– ——– —- ——–
    True True List`1 System.Object

    Output from working machine.

    $options.DisabledServicePlans
    MCOVOICECONF_GOV
    SHAREPOINTWAC_GOV
    SHAREPOINTENTERPRISE_GOV

    Version:

    (Get-Item C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll).VersionInfo.FileVersion
    1.0.8000.119

  • #66883
    Profile photo of Dan Potter
    Dan Potter
    Participant

    $options = New-MsolLicenseOptions -AccountSkuId $accountsku -DisabledPlans $($disablecol)

    Fixed, no idea why this changed.

You must be logged in to reply to this topic.