none
assigning bulk license to Office 365 AD synced users RRS feed

  • Question

  • Hi,

    We need to assign bulk office 365 license to more than 5K users. Users are already synched by Dirsync server and we only need to apply license. Our users use Exchange onprem and we need to exclude exchange online license from the E2 plan. So we want only, Lync ,Off web app and  share point. I have prepared the below script it doesn't make any changes even though it doesnt show any error. I appreciate your help 

      $Step1 = New-MsolLicenseOptions -AccountSkuId mycompany:STANDARDWOFFPACK_FACULTY -DisabledPlans EXCHANGE_S_STANDARD

    Import-Csv .\UPN.CSV | foreach {set-MsolUser -UserPrincipalName $_.UPN -UsageLocation SA}

    Import-Csv .\UPN.CSV | foreach {Set-MsolUserLicense -UserPrincipalName $_.UPN -AddLicenses mycompany:STANDARDWOFFPACK_FACULTY -verbose -LicenseOptions $Step1}

    I followed the below link

    http://community.office365.com/en-us/f/148/t/263052.aspx?ss=6818e221-4ad2-45e4-bf3e-ec8451732a99

    Sunday, October 26, 2014 8:05 AM

Answers

  • I tested the below code and it worked

    $disabledplans = 'EXCHANGE_S_STANDARD'
    $step1 = New-MsolLicenseOptions -AccountSkuId mycompany:STANDARDWOFFPACK_FACULTY `
    -DisabledPlans $disabledplans
    
    Import-Csv .\UPN.CSV | 
    foreach {set-MsolUser -UserPrincipalName $_.UPN -UsageLocation SA}
    
    Import-Csv .\UPN.CSV | 
    foreach {Set-MsolUserLicense -UserPrincipalName $_.UPN -AddLicenses mycompany:STANDARDWOFFPACK_FACULTY -verbose -LicenseOptions $Step1} 
    
    
    


    Regards Chen V [MCTS SharePoint 2010]

    • Marked as answer by Michael Jom Monday, October 27, 2014 6:46 AM
    Sunday, October 26, 2014 1:33 PM

All replies

  • I tested the below code and it worked

    $disabledplans = 'EXCHANGE_S_STANDARD'
    $step1 = New-MsolLicenseOptions -AccountSkuId mycompany:STANDARDWOFFPACK_FACULTY `
    -DisabledPlans $disabledplans
    
    Import-Csv .\UPN.CSV | 
    foreach {set-MsolUser -UserPrincipalName $_.UPN -UsageLocation SA}
    
    Import-Csv .\UPN.CSV | 
    foreach {Set-MsolUserLicense -UserPrincipalName $_.UPN -AddLicenses mycompany:STANDARDWOFFPACK_FACULTY -verbose -LicenseOptions $Step1} 
    
    
    


    Regards Chen V [MCTS SharePoint 2010]

    • Marked as answer by Michael Jom Monday, October 27, 2014 6:46 AM
    Sunday, October 26, 2014 1:33 PM
  • Thanx a lot. It worked in my test. 
    Tuesday, October 28, 2014 12:12 PM
  • glad it helped. Cheers!!! Enjoy PowerShell and Office 365 :)


    Regards Chen V [MCTS SharePoint 2010]

    Tuesday, October 28, 2014 12:20 PM