【SharePoint】展開されているサイトスクリプト・サイトデザインを取得する

f:id:tecchan365:20190620052143p:plain SharePointに展開されているサイトスクリプト・サイトデザインを取得する方法をご紹介します。

事前準備

SharePoint Management Shell をインストール、もしくはPowerShellギャラリーからモジュールをインストールしておいてください。

mynote365.hatenadiary.com

www.powershellgallery.com

サイトデザインを削除する

以下のps1ファイルを作成し、実行します。

# サイトデザインを展開したいURL
$targetUrl = "https://<<tenant>>-admin.sharepoint.com/";

# SharePoint管理者のメールアドレス
$mailAddress = "hoge@contoso.com";

Connect-SPOService -Url $targetUrl -credential $mailAddress

Write-Host "**************** Site Design ******S**********" -ForegroundColor Yellow
Get-SPOSiteDesign

Write-Host "**************** Site Script ****************" -ForegroundColor Green
Get-SPOSiteScript

正常に実行されると、下記のようにサイトデザイン・サイトスクリプトの一覧が表示されます。 f:id:tecchan365:20190620052317p:plain

以上です。