

Get-MsolUser -All -DomainName ‘’ | Set-MsolUserLicense -AddLicenses “tenantname:ENTERPRISEPACK”Ī full list of properties to use with Get-MsolUser can be found here. This command will assign licenses only to users with a specific domain name: There are several other properties that may be useful in narrowing down the scope of users to bulk assign licenses to. Use the following command to view only users that do not have a license assigned: Get-MsolUser -All -UsageLocation ‘US’ | Set-MsolUserLicense -AddLicenses “tenantname:ENTERPRISEPACK” The following command would assign an E3 license to all users in the US only: Once the location is assigned either through the admin portal or PowerShell, you can assign licenses. Get-MsolUser -All | Select DisplayName,UsageLocation To verify the results, use the following command: Get-MsolUser -All | Set-MsolUser -UsageLocation US To assign the US location to all of your tenant users, use the following command: Now, we’re using PowerShell – we want to actually bulk assign licenses and locations, not just do single users. To assign the US location to a single user, you would use the following command:Īll countries follow the 2-letter ISO code standard – a list of those can be found here. This will essentially provision the Exchange Online mailbox in the proper region and ensure that it follows all local laws, etc. This is a required field and is done by country. If you’re lucky enough to just assign all users in your tenant a license, your process will be relatively simple. Prior to assigning licenses, you must assign a location. This can be a difficult task, especially in larger organizations. Now that you know what you have available to assign, you need to determine which users will be assigned a license. If you’re using E1/E3 licenses, they will have a name like “tenantname:ENTERPRISEPACK” or “tenantname:STANDARDPACK”. The results will contain your tenant name and sku and looks something like this: To generate a list of what is available and assigned, run the following command: This can be viewed easily in the admin portal under Billing, but is identified by the AccountSkuID in PowerShell. Next, you will need to get a list of licenses available in your tenant. You will be prompted for credentials – this needs to be a user with at least user management role permissions, but most operations in this module will require global admin permissions. To connect to O365/MSOnline, use the following command:
#USE POWERSHELL FOR OFFICE 365 ON MAC INSTALL#
If you haven’t done this before, follow these steps to install the prerequisites. That process is pretty straightforward for a single user.īut how do you do it for a hundred or thousand people in your organization? PowerShell.įirst, you will need to connect to Office 365 via PowerShell. If you manage an Office 365 tenant, you are probably familiar with assigning licenses to provision services for users.
