Creating the first user account in PowerShell
If you have an account in Office 365 (even if there is no license assigned to it), using that account you can connect to Office 365 using PowerShell. The operations or cmdlets that you can execute vary depending on the permissions and licenses assigned to that account.
Note
PowerShell cmdlets for Office 365 use the following pattern:
<Verb>-Msol<noun>
For example, take a look at this:
Get-MsolUser
Here, MSOL
= Microsoft Online.
To find out about all the commands, use Get-Command *Msol*
.
Once the connection is established successfully, let's create a new user account. To create the user account, the account that we will be using needs to be part of the global administrator role or the user management role.
Ensuring user account permissions
Let's check whether the account has the necessary permissions using the following PowerShell cmdlet:
Get-MsolUserRole
This cmdlet gets all the administrator roles that the specified user belongs to. It will...