Fortunately the Client Side Object Model (CSOM) comes to the rescue and can be used from powershell. I have collected some great sources that can be taken as a reference for performing basic tasks.
- Basic opertions with CSOM (C# examples)
- Set up your environment for using the Sharepoint CSOM API
- Create a web (C# example)
- SharePoint client browser (to navigate discover, SharePoint 2013 and Office365)
- Create a SharePoint site structure with Powershell