sharepoint online を powershell で管理してみよう!!

14
SharePoint OnlinePowerShell で管理してみよう!! Japan SharePoint Group #5 @大阪 2012/12/01 株式会社内田洋行 太田 浩史

Upload: hirofumi-ota

Post on 01-Dec-2014

3.747 views

Category:

Technology


0 download

DESCRIPTION

Japan SharePoint Group #5 @大阪でライトニングトークを行った時の資料です。

TRANSCRIPT

Page 1: SharePoint Online を PowerShell で管理してみよう!!

SharePoint OnlineをPowerShellで管理してみよう!!

Japan SharePoint Group #5 @大阪 2012/12/01

株式会社内田洋行 太田 浩史

Page 2: SharePoint Online を PowerShell で管理してみよう!!

SharePoint Online 増えてますか? もうちょっとでバージョンアップしそうですし…。

Page 3: SharePoint Online を PowerShell で管理してみよう!!

でも、 SharePoint Onlineって管理が 面倒じゃないですか?

Page 4: SharePoint Online を PowerShell で管理してみよう!!

Web インタフェースしかないですもんね…。

Page 5: SharePoint Online を PowerShell で管理してみよう!!

そんなあなたに耳よりなお知らせ 「SharePoint Online Management Shell」

がありますよ!!

Page 7: SharePoint Online を PowerShell で管理してみよう!!

http://www.microsoft.com/en-us/download/details.aspx?id=34595

PowerShell 3.0 も必要なので、Windows Management Framework 3.0 も入れる!

Page 8: SharePoint Online を PowerShell で管理してみよう!!

コマンドレット

Add-SPOUser Get-SPOUser Remove-SPOUser Set-SPOUser

Get-SPOSiteGroup New-SPOSiteGroup Remove-SPOSiteGroup Set-SPOSiteGroup

Upgrade-SPOSite Request-SPOUpgradeEvalutionSite

Get-SPODeletedSite Get-SPOSite New-SPOSite Remove-SPODeletedSite

Remove-SPOSite Repair-SPOSite Restore-SOPDeletedSote

Set-SPOSite

Test-SPOSite

Connect-SPOService Disconnect-SPOService

Get-SPOAppErrors Get-SPOAppInfo Get-SPOTenant Get-SPOTenantLogEntry

Get-SPOTenantLogLastAvailableTimeInUtc

Get-SPOWebTemplate Set-SPOTenant

用意されているコマンドレットはこんな感じ…。 詳しくはWebで!! http://office.microsoft.com/ja-jp/sharepoint-help/HA102915057.aspx

Page 9: SharePoint Online を PowerShell で管理してみよう!!

さて、試してみますか

Page 10: SharePoint Online を PowerShell で管理してみよう!!

Connect-SPOService –Url https://<tenant domain>-admin.sharepoint.com -Credential <account>@<tenant domain>.onmicrosoft.com

SharePoint Online への接続

Get-SPOSite

サイトコレクションの一覧を取得

New-SPOSite -Url https://<tenant domain>.sharepoint.com/sites/<site url> -Owner <account>@<tenant domain>.onmicrosoft.com -StorageQuota 100 -NoWait

サイトコレクションを作成

Get-Command -Module Microsoft.Online.SharePoint.PowerShell

コマンドレットの一覧

Disconnect-SPOService

SharePoint Online からの切断

Page 11: SharePoint Online を PowerShell で管理してみよう!!

大量にサイトコレクションを作ってみる

Title,Url,Owner,StorageQuota 1001,https://<tenant domain>.sharepoint.com/sites/1001,<account>@<tenant domain>.onmicrosoft.com,100 1002,https://<tenant domain>.sharepoint.com/sites/1002,<account>@<tenant domain>.onmicrosoft.com,100 1003,https://<tenant domain>.sharepoint.com/sites/1003,<account>@<tenant domain>.onmicrosoft.com,100 1004,https://<tenant domain>.sharepoint.com/sites/1004,<account>@<tenant domain>.onmicrosoft.com,100 1005,https://<tenant domain>.sharepoint.com/sites/1005,<account>@<tenant domain>.onmicrosoft.com,100 1006,https://<tenant domain>.sharepoint.com/sites/1006,<account>@<tenant domain>.onmicrosoft.com,100 1007,https://<tenant domain>.sharepoint.com/sites/1007,<account>@<tenant domain>.onmicrosoft.com,100

こんな CSV を…

こんなスクリプトで回してみる

$csv = Import-Csv <file path> foreach($line in $csv) { New-SPOSite -Title $line.Title -Url $line.Url -Owner $line.Owner -StorageQuota $line.StorageQuota -NoWait Write-Host "Create Site "$line.Url }

Page 13: SharePoint Online を PowerShell で管理してみよう!!

もっと色々やりたい? CSOM (Client Side Object Model)

を 使いましょう!!

使い方は、また今度…。

Page 14: SharePoint Online を PowerShell で管理してみよう!!

おしまい