Table of Contents

3.3 365

Installing Office 365 – MsOnline - Module

1) First download and install the following: https://go.microsoft.com/fwlink/p/?LinkId=286152
2) Type the following in PowerShell
install-module -name MSOnline
Connect-MsolService -Credential $Credentials

To see if new user exists in 365

Get-MsolUser -UserPrincipalName "jdoe@poshpython.com"

See users license

((Get-MsolUser -UserPrincipalName "jdoe@poshpython.com").licenses).accountskuid

To see available licenses to assign


assign license

Set-MsolUserLicense -UserPrincipalName "jdoe@poshpython.com" -AddLicenses "poshpython:DESKLESSPACK" -usagelocation australia

$Then to remove license

Set-MsolUserLicense -UserPrincipalName "jdoe@poshpython.com" -RemoveLicenses poshpython:STANDARDPACK

Then to wrap up check to see iflicensed is TRUE

Get-MsolUser -UserPrincipalName "jdoe@poshpython.com"

Visit next page to learn about - 3.4 SQL Server