Todd's Blog

Todd's Tips for System Adminstrators

  • TechDays
  • Speaking Engagements
  • Contact Me
  • About Me

Connect

  • LinkedIn

Powered by Genesis

Provisioning Users in Office 365 Who are Not Provisioned

posted on March 25, 2015

One of things when setting up Office 365 is to provision new accounts with licenses. There is a quick and easy way in Office 365 to get a list of these users and then provision these users. Login to your Office 365 account via PowerShell

Get-MSOLUser -Domain "contoso.com" -UnlicensedUsersOnly -All | Select UserPrincipalName | Export-Csv -Path 
"c:\temp\filename.csv"

Once you have a file full of your unlicensed users you can then set each of the users with an Office 365 License. Using the same filename we created above we can run the following command which will basically loop for each user in the file and set the license.
Import-Csv -Path “c:\temp\filename.csv” |%{Set-MsolUserLicense -userPrincipalName $_.UserPrincipalName -AddLicenses “contso:ENTERPRISEPACK”}

How did I get the license to use? Easy, Just run  Get-MsolAccountSku and it will list off your licenses. For a full page of information check the TechNet blog for more of these.  I am also sure there is a way you can use a variable to pass the values on without creating a file, but I do like having the file for a sanity check if something goes wrong.

http://blogs.technet.com/b/treycarlee/archive/2013/11/01/list-of-powershell-licensing-sku-s-for-office-365.aspx

Filed Under: Technology Tagged With: Office 365, Powershell

About Todd Lamothe

Recent Posts

  • Office 365 – Creating Custom SKUs
  • Setting a Default Printer in Windows 10
  • Deploying Windows to the Correct Drive in Configuration Manager
  • Surface Pro 4, Surface Dock and DVI Problems
  • Enabling UEV in Windows 10 1607

Recent Comments

  • Moore Details on Setting up a Delayed Charge in Quickbooks Online
  • MCP Exam Training on Using PowerShell to Get a List of Groups from Active Directory
  • Kac on Setting up an Office 2010 KMS Host Server
  • prabumedia.com | Pilih lisensi MAK atau MKS untuk aktifasi produk Microsoft ? on Setting up a KMS Server
  • prabumedia.com | Pilih lisensi MAK atau MKS untuk aktifasi produk Microsoft ? on Setting up an Office 2010 KMS Host Server

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org