New Office 365 PowerShell Scripts
It is now possible to manage user licenses, group and role membership, domains and single sign-on through Remote PowerShell
Take a look here: https://onlinehelp.microsoft.com/en-us/office365-enterprises/hh125002.aspx#BKMK_subs