How to create a service account via Microsoft PowerShell

Connect to Microsoft Online using PowerShell and execute the following, where <UserPrincipalName> and <Password> are the username and temporary password (that you will be forced to change upon logging on for the first time) for the AskCody service account: