none
Enabling new AD users for Skype for Business Online RRS feed

  • Question

  • We've recently decommissioned our old Lync 2013 environment and are now completely off the hybrid model; the old Lync 2013 server is shutdown. I used to have a script to enable the new AD users but I can't figure out the syntax or which modules I need to have loaded to automatically enable new users for Skype for Business Online.

    The other issue I'm trying to work around is that we have both E1 & E3 licenses, and per the CIO the license a person receives is based upon their job title in AD. We have about 300 different job titles and we were thinking of trying to define the shorter list of titles for a specific license, and assume the remainder are the other license. Any ideas on how to script that in powershell?

    Thanks!

    Friday, September 23, 2016 2:22 PM

Answers

  • To be more specific, for a list you'd want to put it into a CSV, and use import-CSV

    https://technet.microsoft.com/en-us/library/ee176874.aspx?f=255&MSPPError=-2147217396

    If the job title is in the list, then just use a for each loop with an if/else statement

    https://technet.microsoft.com/en-us/library/ee692791.aspx

    http://www.powershellatoms.com/shell-environment/understanding-if-else-statements-in-powershell/

    If it's just a raw list, then use get-msoluser and run that through a for each.  For each user in there, see if it exists in the CSV array you imported https://technet.microsoft.com/en-us/library/ee692798.aspx?f=255&MSPPError=-2147217396

    If true, then execute you licensing for E3, if false, then execute for E1.


    Please remember, if you see a post that helped you please click "Vote" on the left side of the response, and if it answered your question please click "Mark As Answer". SWC Unified Communications This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, SWC, their employees, or other MVPs.

    • Proposed as answer by jim-xuModerator Tuesday, September 27, 2016 6:45 AM
    • Marked as answer by JimCass Tuesday, September 27, 2016 3:46 PM
    Monday, September 26, 2016 3:33 PM

All replies

  • To enable a new Skype for Business Online user, you simply need to assign the license via PowerShell.  Here's a script that assigns a full E3 as well as some CloudPBX stuff for reference: https://support.office.com/en-us/article/Assign-Cloud-PBX-licenses-and-PSTN-Calling-plans-to-multiple-users-213753aa-8ad8-49be-88a1-0e6272f14ad2


    Please remember, if you see a post that helped you please click "Vote" on the left side of the response, and if it answered your question please click "Mark As Answer". SWC Unified Communications This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, SWC, their employees, or other MVPs.

    • Proposed as answer by Akampa Monday, September 26, 2016 9:11 AM
    • Unproposed as answer by JimCass Monday, September 26, 2016 1:18 PM
    Friday, September 23, 2016 2:53 PM
  • OK, what about the second paragraph? When I'm parsing through the account to enable them, can I have powershell consult a list (either in the script itself or in an external file) and give the matching staff E3 licenses, and if not found give them E1? Looking for syntax examples.
    Monday, September 26, 2016 1:20 PM
  • To be more specific, for a list you'd want to put it into a CSV, and use import-CSV

    https://technet.microsoft.com/en-us/library/ee176874.aspx?f=255&MSPPError=-2147217396

    If the job title is in the list, then just use a for each loop with an if/else statement

    https://technet.microsoft.com/en-us/library/ee692791.aspx

    http://www.powershellatoms.com/shell-environment/understanding-if-else-statements-in-powershell/

    If it's just a raw list, then use get-msoluser and run that through a for each.  For each user in there, see if it exists in the CSV array you imported https://technet.microsoft.com/en-us/library/ee692798.aspx?f=255&MSPPError=-2147217396

    If true, then execute you licensing for E3, if false, then execute for E1.


    Please remember, if you see a post that helped you please click "Vote" on the left side of the response, and if it answered your question please click "Mark As Answer". SWC Unified Communications This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, SWC, their employees, or other MVPs.

    • Proposed as answer by jim-xuModerator Tuesday, September 27, 2016 6:45 AM
    • Marked as answer by JimCass Tuesday, September 27, 2016 3:46 PM
    Monday, September 26, 2016 3:33 PM
  • Looks like I got it working. Thank you!
    Tuesday, September 27, 2016 3:46 PM