none
Reg:: Error While Replacing Office-365 Licenses RRS feed

  • Question

  • Hi PowerShell Experts,

    Greetings!!

    Please help us for my scenario as below.

    --> Our client requessted us to replace the "STANDARDWOFFPACK_STUDENT" and "OFFICESUBSCRIPTION_STUDENT" licenses with "STANDARDWOFFPACK_IW_STUDENT" license. Hence, we are trying to execute the below PS command to replace the licenses. During this process, we are getting the followed error screen always.

    PS C:\Madhu> Get-MsolUser -MaxResults 1 | Set-MsolUserLicense -RemoveLicenses "orgname:STANDARDWOFFPACK_STUDENT", "orgname:OFFICESUBSCRIPTION_STUDENT" -AddLicenses "orgname:STANDARDWOFFPACK_IW_STUDENT"

    Best Regards,

    Madhu


    Thursday, May 28, 2015 2:53 AM

Answers

  • Hi Madhu,

    This error indicate the wrong license input, please enter the value of the AccountSkuID in the Get-MsolAccountSku cmdlet , please also refer to the script below:

    $license = "orgname:STANDARDWOFFPACK_IW_STUDENT"
    Get-MsolAccountSku|where {$_.AccountSkuId -eq $license}
    
     For more detailed information about assign O365 license, please go through these articles:

    Assigning a license to a user

    Adding license options to an existing user with Powershell

    I also recommend you can post in the Office 365 Forum for more effective support.

    http://community.office365.com/en-us/f/148.aspx

    If there is anything else regarding this issue, please feel free to post back.

    Best Regards,

    Anna Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Saturday, May 30, 2015 10:53 AM
    Moderator

All replies

  • Did you follow the instructions?


    \_(ツ)_/

    Thursday, May 28, 2015 4:16 AM
    Moderator
  • Hi Jrv,

    Yes, i have cross checked the AccountSkuID and updated the script as below.

    PS C:\>Get-MsolUser -MaxResults 1 | Set-MsolUserLicense -RemoveLicenses "orgname:STANDARDWOFFPACK_STUDENT", "orgname:OFFICESUBSCRIPTION_STUDENT" -AddLicenses "orgname:STANDARDWOFFPACK_IW_STUDENT"

    But, unfortunately still I'm getting the same error.

    Error:

    Set-MsolUserLicense : The license "orgname:STANDARDWOFFPACK_IW_STUDENT is
    not valid.  To find a list of valid licenses, please call the Get-MsolAccountSk
    u cmdlet.
    At line:1 char:49
    + Get-MsolUser -MaxResults 1 | Set-MsolUserLicense <<<<  -RemoveLicenses "orgname:STANDARDWOFFPACK_STUDENT", "orgname:OFFICESUBSCRIPTION_STUDENT
    " -AddLicenses "orgname:STANDARDWOFFPACK_IW_STUDENT"
        + CategoryInfo          : OperationStopped: (:) [Set-MsolUserLicense], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.InvalidUserLicenseException,Microsoft.Online.Administration.Automation.SetUserL
      icense

    Could you please help us.

    Best Regards,

    Madhu

    Thursday, May 28, 2015 7:24 AM
  • Hi Madhu,

    This error indicate the wrong license input, please enter the value of the AccountSkuID in the Get-MsolAccountSku cmdlet , please also refer to the script below:

    $license = "orgname:STANDARDWOFFPACK_IW_STUDENT"
    Get-MsolAccountSku|where {$_.AccountSkuId -eq $license}
    
     For more detailed information about assign O365 license, please go through these articles:

    Assigning a license to a user

    Adding license options to an existing user with Powershell

    I also recommend you can post in the Office 365 Forum for more effective support.

    http://community.office365.com/en-us/f/148.aspx

    If there is anything else regarding this issue, please feel free to post back.

    Best Regards,

    Anna Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Saturday, May 30, 2015 10:53 AM
    Moderator
  • I am having the same issue, I followed your example, Anna.


    get-aduser myuser | get-msoluser | set-msoluser -usagelocation US

    get-aduser myuser | get-msoluser | Set-MsolUserLicense -addlicenses (Get-MsolAccountSku|where {$_.AccountSkuId -like "*IW_ST*"}).accountskuid

    Set-MsolUserLicense : The license orgnam:STANDARDWOFFPACK_IW_STUDENT is not valid.  To find a list of valid licenses,
    please call the Get-MsolAccountSku cmdlet.
    At C:\Scripts\NEWSTUDENT\withgetmsol.ps1:21 char:39
    + get-aduser myuser | get-msoluser | Set-MsolUserLicense -addlicenses (Get-Msol ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [Set-MsolUserLicense], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.InvalidUserLicenseException,Microsoft.Online.
       Administration.Automation.SetUserLicense

    [PS] C:\Scripts\T>Get-MsolAccountSku|where {$_.AccountSkuId -like "*IW_ST*"}

    AccountSkuId                                                            ActiveUnits     WarningUnits    ConsumedUnits
    ------------                                                            -----------     ------------    -------------
    orgname:STANDARDWOFFPACK_IW_STUDENT                                        1000000         0               xxxx

    ---------------edit--------------

    so I added (Get-MsolAccountSku|where {$_.AccountSkuId -like "*IW_ST*"}).accountskuid 



    • Edited by chad.doebelin Friday, February 10, 2017 9:41 PM .accountskuid
    Friday, February 10, 2017 9:30 PM