SharePointにはオンプレミスのSharePoint ServerとオンラインのSharePoint Onlineがある.いずれも管理シェルからコマンドレットで動かすことができる.管理シェルはこのページからダウンロードしインストールする.SharePoint Onlineに接続するには次のコマンドレットをうつ.
Connect-SPOService -Url https://ホスト名-admin.sharepoint.com/ -credential Get-Credential
Import-Module MSOnlineでPowerShellにOffice365のコマンドレットセットを導入するにはまずExchange Onlineに接続する必要がある.$UserCredential = Get-Credentialのあと,次のコマンドレットを使う.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
この後にImport-PSSession $Sessionを忘れなく.こうしてImport-Module MSOnlineがきくようになる.
SharePointについてはこちらが詳しい.
