Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Office365 Bulk Upload with multiple license plans from CSV

Posted on 2016-10-05
3
Medium Priority
?
119 Views
Last Modified: 2016-10-05
Does anyone have a script that will create users from a CSV with ALL available fields available in Office365  and assign licenses, the license plans we have are as follows.

TENANT:STREAM        
TENANT:CRMPLAN2      
TENANT:POWERAPPS          
TENANT:POWER_BI_PRO          
TENANT:ENTERPRISEPACK      
TENANT:PLANNERSTANDALONE        
TENANT:CRMSTANDARD          
TENANT:POWER_BI_STANDARD        
TENANT:INTUNE_A
TENANT:EMS
TENANT:AAD_PREMIUM      
TENANT:PROJECTPROFESSIONAL

Really pulling my hair out with this, have tried to change existing ones but no joy.

Thanks in Advance

John
0
Comment
Question by:John Davies
3 Comments
 
LVL 44

Expert Comment

by:Vasil Michev (MVP)
ID: 41830265
You can get all the available SKUs for your tenant via: Get-MsolAccountSku

If you mean a full list of all available plans overall, the closest thing you can get to it is here: https://blogs.technet.microsoft.com/treycarlee/2014/12/09/powershell-licensing-skus-in-office-365/
0
 
LVL 17

Accepted Solution

by:
Todd Nelson earned 2000 total points
ID: 41830704
Start out with a CSV file that will be used to create users in O365.  This is similar to what the CSV could look like based on the fields you can provide input for...

UserPrincipalName,City,Country,Department,DisplayName,Fax,FirstName,LastName,MobilePhone,Office,PhoneNumber,PostalCode,State,StreetAddress,Title
john.doe@oddytee.com,My Town,United States,IT Department,John Doe,111-111-1111,John,Doe,222-222-2222,Headquarters,333-333-3333,11111,CA,123 My Street,Network Engineer

Open in new window


Then connect to Office 365 through PowerShell.

Next, you will run this command to create users in O365 from the CSV file...

Import-Csv "C:\NewUsers.csv" | ForEach-Object { New-MsolUser -UserPrincipalName $_.UserPrincipalName -City $_.City -Country $_.Country -Department $_.Department -DisplayName $_.DisplayName -Fax $_.Fax -FirstName $_.FirstName -LastName $_.LastName -MobilePhone $_.MobilePhone -Office $_.Office -PhoneNumber $_.PhoneNumber -PostalCode $_.PostalCode -State $_.State -StreetAddress $_.StreetAddress -Title $_.Title }

Open in new window


Lastly, this article provides the reference you need to assign licenses and license options to existing users in O365 ... https://oddytee.wordpress.com/2016/06/28/assign-subscription-licenses-and-license-options-to-office-365-users/

Let me know.
0
 

Author Closing Comment

by:John Davies
ID: 41831227
Spot on, thank you  Todd :-)
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft is moving in-place eDiscovery & hold from ECP to EOP console under Content Search in Search and Investigation Options.  In this post, I will be showing you how to export emails to a PST file using the Content Search Options.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question