Problem: You can't do much
Solution: Use the SharePoint Client API! Just load it into Powershell and away you go. Pretty slick that you can use your knowledge of the client api in Powershell.
- Get your hands on the SharePoint Client Components installer. Install it.
- It should install to the default location at "". If not make changes to the code below.
- Insert this at the top of your script
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
* If you can't run scripts, try running as admin and maybe set your Powershell policy to "Set-Executionpolicy -ExecutionPolicy Unrestricted"
Here's a sample script to create a sub-site:
$siteUrl = "https://YOUR SPO365 URL HERE"
$password = Read-Host -Prompt "Enter password" -AsSecureString
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials("Your@email.here", $password)
$ctx.Credentials = $credentials
$webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation
$webCreationInformation.Url = "demo01site"
$webCreationInformation.Title = "Demo 01 Site"
$webCreationInformation.WebTemplate = "PROJECTSITE#0"
$newWeb = $ctx.Web.Webs.Add($webCreationInformation)
$ctx.Load($newWeb)
$ctx.ExecuteQuery()
Write-Host "Title" $newWeb.Url " Created"