TechShizz | All posts tagged 'Office 365'

Issues with Office 365 sign-on or credentials (Including setting up Outlook)

If you have any issues with setting up Office 365 credentials but everything server side looks OK, try running this on the client machine.

Ensure the account your signing in with has relevant permissions to perform the action you are trying to do before running:

Office 365 O365 Support and Recovery Assistant

Download this to the client machine and run it as local admin.

Installing Information Right Management for Office 365

IRM needs to be activated first:

Service settings > Rights Management > Manage

Click Activate:

Rights Management is not activated


Managing IRM


Before we can manage IRM in PowerShell there is an module that needs to be downloaded and installed.

Download the Azure Rights Management Administration Tool - English - United Kingdom







Import-module aadrm

Connect-aadrmservice -verbose



Connect-aadrmservice -verbose




Administering Licenses in Office 365 via PowerShell

Manage user licences in Azure PowerShell







Get-MsolaccountSku | Where-Object {$_.SkuPartNumber -eq "EnterprisePack"} | ForEach-Object {$_.ServiceStatus}

Get-MsolaccountSku | Where-Object {$_.SkuPartNumber -eq



List of all users

Get-MsolUser -all


Export list of user licences

Get-MsolUser -all | ft displayname, islicensed | Out-File "C:\UserLicences.csv"

Get Licensed users results


Set a users usage location (Required before assigning a licence)

Set-MsolUser -userprincipalname user@domain.local -useagelocation "GB"


Assign a licence to a user

Set-MsolUserLicence -userprincipalname user@domain.local -AddLicenses "TeamRou:EnterprisePack"

Assigne licenses results


Remove a licence from a user

Set-MsolUserLicence -userprincipalname user@domain.local -Removelicences "CBTNuggets346:EnterprisePack"


Remove licenses results

Administering Office 365 Users via PowerShell

Remember, you must connect to O365 first:


Users can be adding with the following methods:


  • O365 Admin Centre
  • Bulk Import (CSV)
  • Windows PowerShell
  • Directory Synchronization





New-MsolUser -UserPrincipalName user@domain.local -DisplayName "User One" -FirstName "User" -LastName "One"


Remove-MsolUser -UserPrincipalName user@domain.local

(30 Day recycle bin)


Set-MsolUser -UserPrincipalName user@domain.local


Restore-MsolUser -UserPrincipalName user@domain.local


Restore-MsolUser -UserPrincipalName

Bulk User Imports

Bulk user imports in office 365 are easy. They can be done from the Admin panel under the users page. There is a Microsoft example CSV file than can be used. 

I've created my own, which can be saved as a CSV. The formulas here allow you to enter the Domain, and names and everything else is done for you. 

O365-Bulk-User-Import-Template.xlsx (10.9KB)