Updated create-sharepoint-site-collection.txt

Erik Masdal authored
revision afba067217943287b9260590c3bb1ffa0e86ffc6
kapittel-2-provision-sharepoint-online-site-collections/create-sharepoint-site-collection
# 2.2 Create SharePoint site collection
_Set SharePoint Online site collection administrator; set resource quota and warning
level and automatic adjustment of site collection sizes; set storage quota for site
collection and configure name and URL of site collection using the web UI and
Windows PowerShell_

___

Når vi skal benytte PowerShell opp mot SharePoint Online må vi sørge for at følgende er gjennomført på forhånd: [Install SharePoint Online Management Shell.](https://www.penflip.com/Masdal/study-guide-enabling-office-365-services/blob/master/annet/install-sharepointonline.txt)

### 2.2.1 Create SharePoint Online Site
**Web-UI**
Logger oss inn på Admin Portal, og velger SharePoint under Admin Centers.
![2016-11-19-15_11_37-office-admin-center-home.png](images/2016-11-19-15_11_37-office-admin-center-home.png)

Velger New > Private Site Collection
![2016-11-19-15_13_00-manage-site-collections.png](images/2016-11-19-15_13_00-manage-site-collections.png)

Skriver inn informasjon for Site Collection.
![2016-11-19-15_14_39-manage-site-collections.png](images/2016-11-19-15_14_39-manage-site-collections.png)

Ser at Site Collection starter å bli opprettet.
![2016-11-19-15_15_07-manage-site-collections.png](images/2016-11-19-15_15_07-manage-site-collections.png)
![2016-11-19-15_36_21-first-site-collection-hjemmeside.png](images/2016-11-19-15_36_21-first-site-collection-hjemmeside.png)

**PowerShell**
```Powershell
# Kobler oss opp mot SharePoint Online
Connect-SPOService -Url https://-admin.sharepoint.com -Credential (Get-Credential)

# Oppretter en ny Site Collection
New-SPOSite -Url https://.sharepoint.com/sites/mysecondcollection -Owner erik@.onmicrosoft.com -StorageQuota 100 -Title "My second site collection"

# Henter Site Collections
Get-SPOSite
```

Ser at vi henter ut våre Site Collections. Kan se at den vi nettopp opprettet er listet opp.
![2016-11-19-15_31_30-administrator_-windows-powershell-ise.png](images/2016-11-19-15_31_30-administrator_-windows-powershell-ise.png)

I kommandoene ovenfor benyttet vi ikke -Template som parameter og derfor må vi velge hvilket område Site Collection skal være første gang går inn på denne.

```
# Henter ut alle eksisterende Templates
Get-SPOWebTemplate
```
![2016-11-26-15_12_53-administrator_-sharepoint-online-management-shell.png](images/2016-11-26-15_12_53-administrator_-sharepoint-online-management-shell.png)

Dermed kan vi benytte **'Name'** for å spesifisere hvilken Template vi skal bruke. I eksempelet nedenfor oppretter vi et Gruppeområde.
```
# Oppretter Site Collection, som er et gruppeområde (STS#0)
New-SPOSite -Url -Owner -Title -Template STS#0 <br>```<br><br>### 2.2.2 Set SharePoint Online site collection administrator<br>**Web-UI**<br>Når vi oppretter ny Site Collection, eller vi redigerer en eksisterende velger vi Administrator for Site Collection. Her kan vi søke opp brukere som er knyttet til Tenant.<br>![2016-11-26-13_03_50-manage-site-collections.png](images/2016-11-26-13_03_50-manage-site-collections.png)<br>![2016-11-26-13_04_13-manage-site-collections.png](images/2016-11-26-13_04_13-manage-site-collections.png)<br><br><br>Manage administrators for a site collection: https://support.office.com/en-us/article/Manage-administrators-for-a-site-collection-9a7e46f9-3fc4-4297-955a-82cb292a5be0?ui=en-US&rs=en-US&ad=US<br><br>**PowerShell**<br>```<br># Setter Site Collection Administrator<br>Set-SPOUser -site $SiteCollURL -LoginName $SiteCollectionAdmin -IsSiteCollectionAdmin $True<br><br># Endrer Primary Site Collection Administrator<br>Set-SPOSite -Identity $SiteCollURL -Owner $NewSiteAdmin -NoWait<br>```<br>SharePoint Online: Add Site Collection Administrator using PowerShell: http://www.sharepointdiary.com/2015/08/sharepoint-online-add-site-collection-administrator-using-powershell.html<br><br><br>### 2.2.3 Set resource quota and warning level<br>**Web-UI**<br>Resource Quota har som mål å sørge for at alle Site Collections skal ha bra ytelse. Enkelte Site Collections kan ha behov for mer ressurser enn andre. Resource Quota er derfor en vekting av hvilke sider som skal ha bedre ytelse og performance enn andre.<br><br>Under _SharePoint Admin Center > Site Collections_ kan vi velge å sette/endre denne verdien.<br>![2016-11-26-13_19_29-manage-site-collections.png](images/2016-11-26-13_19_29-manage-site-collections.png)<br>![2016-11-26-13_21_58-manage-site-collections.png](images/2016-11-26-13_21_58-manage-site-collections.png)<br><br>Manage SharePoint Online server resource quotas for sandboxed solutions: limits:https://support.office.com/en-us/article/Manage-SharePoint-Online-server-resource-quotas-for-sandboxed-solutions-90e4eaaa-899a-48d6-b850-f272366bf8cc<br><br>**PowerShell**<br>Bruker Set-SPOSite med parameter:<br>- _Identity_: URL til Site Collection som vi ønsker å endre verdi på.<br>- _ResourceQuota_: Hvor mange ressurser en Site Collection skal få. Ressurser skal sørge for at alle Site Collections skal ha bra ytelse. Enkelte Site Collections kan ha behov for mer ressurser enn andre.<br>- _ResourceQuotaWarningLevel_: Hvilken prosent (%) er grense for at administrator blir varslet på epost.<br><br>```<br># Setter Resource Quota og Warning<br>Set-SPOSite -Identity https://<tenant>.sharepoint.com/<url> -ResourceQuota 300 -ResourceQuotaWarningLevel 80<br>```<br><br>Set-SPOSite: https://technet.microsoft.com/nb-no/library/fp161394.aspx<br><br>### 2.2.4 Set automatic adjustment of site collection sizes<br>**Web-UI**<br>Under SharePoint Admin Center finner vi Settings. Her kan vi velge om størrelse på Site Collection skal skje automatisk eller Administrator skal sette manuelle størrelser. Settes denne til Manual, må vi selv gå inn på hver enkelt Collection for å sette Storage Quota.<br>![2016-11-26-13_47_06-https___emasdal-adminsharepointcom__layouts_15_online_tenantsettingsaspx.png](images/2016-11-26-13_47_06-https___emasdal-adminsharepointcom__layouts_15_online_tenantsettingsaspx.png)<br><br>**PowerShell**<br>```<br>PowerShell<br>```<br><br>### 2.2.5 Set storage quota for site collection<br>Har vi satt verdi som er nevnt i **2.2.4 Set automatic adjustment of site collection sizes** til å være manual kan vi sette antall GigaByte per Site Collection.<br><br>> IMPORTANT: SharePoint Online now calculates storage in gigabytes (GB) instead of megabytes (MB) and only full integers are allowed. This does not affect your total storage in SharePoint Online.<br><br>Under SharePoint Admin Center finner vi Settings.<br>![2016-11-26-14_31_18-manage-site-collections.png](images/2016-11-26-14_31_18-manage-site-collections.png)<br><br>Kan sette både Storage Quota og Warning Level.<br>![2016-11-26-13_59_05-manage-site-collections.png](images/2016-11-26-13_59_05-manage-site-collections.png)<br><br>Manage site collection storage limits: https://support.office.com/en-us/article/Manage-site-collection-storage-limits-77389c2c-8e7e-4b16-ab97-1c7103784b08<br><br>**PowerShell**<br>Bruker Set-SPOSite med parameter:<br>- _Identity_: URL til Site Collection som vi ønsker å endre verdi på.<br>- _StorageQuota_: Hvor mange GigaByte en Site Collection skal ha tilgjengelig.<br>- _StorageQuotaWarningLevel_: Hvilken prosent (%) er grense for at administrator blir varslet på epost.<br><br>```<br># Setter Storage Quota og Warning<br>Set-SPOSite -Identity https://<tenant>.sharepoint.com/<url> -StorageQuota 25 -StorageQuotaWarningLevel 80<br>```<br>Set-SPOSite: https://technet.microsoft.com/en-us/library/fp161394.aspx<br><br>### 2.2.6 Configure name and URL of site collection<br>**Web-UI**<br>**PowerShell**<br>Benytter New-SPOSite for å opprette en ny Site Collection. For å konfigurere navn og URL for denne er det følgende parametere som er viktig:<br>```<br>-Url https://<tenant>.sharepoint.com/<URL-NAVN><br>-Title <NAVN-PÅ-SITE-COLLECTION><br>```<br><br>Benytter Set-SPOSite for å gjøre endringer på en allerede eksisterende Site Collection<br>```<br># Spesifierer en Tittel for en bestemt Site Collection<br>Set-SPOSite -Identity https://<tenant>.sharepoint.com/sites/mysecondcollection -Title "AnotherName"<br>```<br>![2016-11-26-14_56_59-manage-site-collections.png](images/2016-11-26-14_56_59-manage-site-collections.png)<br><br><br> </div> </div> </div> <ul class='notes' id='notes-list'></ul> <div class='js-notes-busy'></div> <div class='js-main-target-form'></div> <script> NoteList.init("afba067217943287b9260590c3bb1ffa0e86ffc6", "commit", "/Masdal/study-guide-enabling-office-365-services/notes"); </script> </div> </div> <div class='footer'> <div class='footer-inner clearfix'> <div class='made-in-la'> <p>Penflip is made by <a href="https://twitter.com/madebyloren" target="_blank">Loren Burton</a><br> in Los Angeles, California</p> <div class='footer-share-wrapper'> <a href="https://twitter.com/share" class="twitter-share-button" data-text="Working on a book or writing project? Try Penflip for collaborative writing, version control and publishing" data-url="https://www.penflip.com">Tweet</a> <div class='fb-like' data-href='https://www.penflip.com/' data-layout='button_count' data-send='false' data-show-faces='false' data-width='200'></div> </div> </div> <ul> <h3>About</h3> <li><a href="https://www.penflip.com/penflip/team">Team</a></li> <li><a href="/pricing">Pricing</a></li> <li><a href="http://madebyloren.com/github-for-writers">Our Story</a></li> </ul> <ul> <h3>Quick Start</h3> <li><a href="https://www.penflip.com/Penflip/help/blob/master/writing/Markdown.txt">Markdown</a></li> <li><a href="https://www.penflip.com/Penflip/help/blob/master/getting-started/GeneralOverview.txt">Penflip Basics</a></li> <li><a href="https://www.penflip.com/Penflip/help/blob/master/working-offline/WorkingOffline.txt">Working Offline</a></li> </ul> <ul> <h3>Support</h3> <li><a href="/help">Help</a></li> <li><a href="/penflip/alpha/discussions">Feedback</a></li> <li><a href="/legal">Terms & Privacy</a></li> </ul> <ul> <h3>Connect</h3> <li><a href="mailto:loren@penflip.com">Email</a></li> <li><a href="https://twitter.com/PenflipApp" target="_blank">Twitter</a></li> </ul> </div> </div> <div id='fb-root'></div> <script src='//platform.twitter.com/widgets.js' type='text/javascript'></script> </div> </body> </html>