百SPイッキ作成

百のSharePointサイトを一気に作成させる(させた)。

sites/21037310

1 SiteCollections.csv を準備しておく。

  SharePoint Online Management Shellで百サイトをイッキ作成する。

〈コマンド1〉
Connect-SPOService -Url https://****.sharepoint.com

Import-Csv C:\Users\****\Desktop\SiteCollections.csv | ForEach-Object {New-SPOSite -Owner $_.Owner -StorageQuota $_.StorageQuota -Url $_.Url -Template $_.Template -TimeZoneID $_.TimeZoneID -Title $_.Name}


****

Import-Csv C:\Users\****\Desktop\SiteCollections.csv | ForEach-Object {New-SPOSite -Owner $_.Owner -StorageQuota $_.StorageQuota -Url $_.Url -Template $_.Template -TimeZoneID $_.TimeZoneID -Title $_.Name}


Import-Csv C:\Users\msmin\Desktop\SiteCollections.csv | ForEach-Object {New-SPOSite -Owner $_.Owner -StorageQuota $_.StorageQuota -Url $_.Url -Template $_.Template -TimeZoneID $_.TimeZoneID -Title $_.Name}

2 Site.csv と Group.csv を準備しておく。

  同様にSharePoint Online Management Shellを走らせ、権限付与処理をする。

〈コマンド2〉

Import-Csv C:\Users\****\Desktop\Site.csv |ForEach {New-SPOSiteGroup -Group $_.Group -PermissionLevels $_.PermissionLevels -Site $_.Site}

Import-Csv C:\Users\****\Desktop\Site.csv |ForEach {New-SPOSiteGroup -Group $_.Group -PermissionLevels $_.PermissionLevels -Site $_.Site}
Import-Csv C:\Users\****\Desktop\Site.csv |ForEach {New-SPOSiteGroup -Group $_.Group -PermissionLevels $_.PermissionLevels -Site $_.Site}

〈コマンド3〉

Import-Csv C:\Users\****\Desktop\Group.csv | ForEach {Add-SPOUser -Group $_.Group –LoginName $_.LoginName -Site $_.Site}

Import-Csv C:\Users\****\Desktop\Group.csv | ForEach {Add-SPOUser -Group $_.Group –LoginName $_.LoginName -Site $_.Site}
Import-Csv C:\Users\****\Desktop\Group.csv | ForEach {Add-SPOUser -Group $_.Group –LoginName $_.LoginName -Site $_.Site}


  • なんにせよ、作れる。初回は百からはじめたが・300を一気作成している。
  • 興味がある人に、このノウハウをお渡しできます。