zettelkasten/OneNoteExport/Kommunikationstechnologie/Sharepoint/Infrastruktur/20_Berechtigungen.md
Ralf Koop 5a108aa2b4 .
2023-08-25 23:29:11 +02:00

7.2 KiB

Berechtigungen

Donnerstag, 18. Oktober 2018

11:24

 

AD Gruppen können nicht verschachtelt werden.

Somit muss jeder User einzeln in die AD Gruppen für Sharepoint aufgenommen werden.

 

Die Gruppe SG-SPT-FarmAdmin auf der Farm als Administrator berechtigt.

Die Gruppe ACL-LS-Server-LogonAsAService die Berechtigung auf den beiden Sharepoint Servern gegeben

Die Gruppe ACL-LS-Server-LogOnAsABatchJob die Berechtigung auf den beiden Sharepoint Servern gegeben

 

 

 

Sharepoint Gruppen :

 

SG-SPT-SC-Admin-Kommunikationstechnologie

SG-SPT-SC-ArbeitshilefenDoku-Memb

SG-SPT-SC-ArbeitshilfenDoku-Owner

SG-SPT-SC-ArbeitshilfenDoku-Read

SG-SPT-SC-ArbeitshilfenWiki-Memb

SG-SPT-SC-ArbeitshilfenWiki-Owner

SG-SPT-SC-ArbeitshilfenWiki-Read

SG-SPT-SC-Mitg-Kommunikationstechnologie

SG-SPT-SC-Mitg-SoftwareEntwicklung

SG-spt-sc-test

SG-SPT-SC-Test-Berechtigung

SG-SPT-SC-Test-Memb

SG-SPT-Web-Portal-Full

SG-SPT-Web-Portal-Read

SU-SPT-SC-Testkonto

 

SG-SPT-Web-Mobilnet-Full

SG-SPT-Web-Mobilnet-Read

SG-SPT-SC-Root_Mobilne-Memb

SG-SPT-SC-Root_Mobilnet-Owner

SG-SPT-SC-Root_Mobilnet-Read

 

 

 

$url = "kt9"

$Name = "kayralf"

$SiteCollURL = "https://portal-spt.bkk-mobiloil.de/sites/$url"

$SiteName = "$Name"

$SiteOwner1 = "i:05.t|adfs4.0|admin-rko@bkk-mobil-oil.de"

$SiteOwner2 = "i:05.t|adfs4.0|admin-kbe@bkk-mobil-oil.de"

$SiteTemplate = "STS#0" #Team Site Template;BLOG#0;BDR#0 -Document Center;ENTERWIKI#0;SPSCOMMU#0

$language = "1033" #1031 german; 1033 english

$Description ="SiteCollection fuer die Gruppe Kommunikationstechonologie! Dokumentation;Information; etc. "

#$QuotaTemplate = "" # 1GB;5GB

$dbname = "SPT_Content_Portal"

$dbserver = "spt-portal" Alias einsetzen

$WebApplication = "https://portal-spt.bkk-mobiloil.de/"

$preName = "SG-SPT-SC-PTL-"

 

The user can add to the SharePoint Group by using following code snippets.

  1. $web=Get-PnPWeb  

  2. $ctx= $web.Context  

  3. $newGroupName=$web.SiteGroups.GetByName("Hubfly Group")  

  4. $ctx.Load($newGroupName)  

  5. $ctx.ExecuteQuery()  

  6. $userName="ravishankar@<tenant-name>. onmicrosoft.com"  

  7. $userInfo = $web.EnsureUser($userName)  

  8. $ctx.Load($userInfo)  

  9. $addUser = $newGroup.Users.AddUser($userInfo)  

  10. $ctx.Load($addUser)  

  11. $ctx.ExecuteQuery()  

 

Aus <https://www.c-sharpcorner.com/article/creating-sharepoint-group-user-and-add-user-to-the-group-on-sharepoint-site-usi/>

 

oder auch :

 

new-SPUser -Useralias $user -Web https://portal-spt.bkk-mobiloil.de/sites/portal -Group "Portal-SPT Owners"

 

 

 

 

 

#$WebApplication = "https://portal-spt.bkk-mobiloil.de/"

$site = Get-SPSite $SiteCollURL

$web = $Site.RootWeb

$user = $web.SiteUsers["i:05.t|adfs4.0|admin-kbe@bkk-mobil-oil.de"]

$permLevel = "Contributor" #values are: None, Guest, Reader, Contributor, WebDesigner, Administrator

 

 

 

 

$desc = "Test1"

$groupname = "KT Test4"

$web.SiteGroups.Add($Groupname,$web.Site.Owner,$1,$desc) # ($User = Mitglieder der Gruppe Komplet : Gruppenname, Owner der Gruppe , Mitglieder der gruppe, Beschreibung der gruppe)

$newGroup = $web.SiteGroups[$groupName]

$newGroupAssign = New-Object Microsoft.SharePoint.SPRoleAssignment($newGroup)

$newGroupAssign.RoleDefinitionBindings.Add($web.RoleDefinitions.GetByType($permLevel))

$web.RoleAssignments.Add($newGroupAssign)

 

$web.Update()

 

$web.Dispose()

 

 

 

 

 

 

$web.SiteGroups[$Groupname].AllowMembersEditMembership = $true

$web.SiteGroups[$Groupname].Update()

 

$web.AllowMembersEditMembership = $true

 

[Webapplication Mobilnet :]{.underline}

 

 

 

Computergenerierter Alternativtext: Policy for Web Application Adding or updating Web application policy with new users or groups will trigger a SharePoint Search crawl over all content covered by that policy. This can reduce search crawl freshness and increase crawl load. Consider using security groups at the policy level and add/remove users from security groups to avoid this. Add Users I X Delete Selected Users \| Edit Permissions of Selected Users Zone (All zones) (All zones) (All zones) (All zones) (All zones) (All zones) (All zones) Display Name NT AUTHORITYiLOCAL SERVICE Search Crawling Account Search Crawling Account (Role) NSG-SPT-web- Mobilnet-Full (Role) 1SG-spT-Web- Mobilnet-Read svc-SptCacheSIJ, svc-SptCacheRLJ„ NT AUTHORIT•ALOCAL SERVICE BKK-MOBlLOlLXsvc- sptSearch sptsearchcon .tladfs4 ONsg -spt- c:D- .tladfs40Nsg -spt- web-mobilnet-read sptcachesu i: O\*.wlbkk-mobiloiNsvc- sptcacheru Full Read Full Read Full Read Full Control Full Read Full Control Full Read {width="5.84375in" height="5.364583333333333in"}

 

Erfasster Bildschirmausschnitt: 14.12.2018 15:06

 

 

 

 

 

 

 

 

Alter stand vor 14.12.2018

 

Computergenerierter Alternativtext: Policy for Web Application Adding or updating Web application policy with new users or groups will trigger a SharePoint Search crawl over all content covered by that policy. This can reduce search crawl freshness and ncrease crawl load. Consider using security groups at the policy level and add/remove users from security groups to avoid this. Add Users I X Delete Selected Users I Edit Permissions of Selected Users Zone (All zones) (All zones) (All zones) (All zones) (All zones) (All zones) (All zones) (All zones) Display Name NT AUTHORITYXLOCAL SERVICE Search Crawding Account Search Crawding Account cfg-SptAdmin (Role) •sPT-web- Mobilnet-Full (Role) NSG-SPT-web- Mobilnet•Read svc-SptC acheSU, svc-SptCacheRU, user Name NT AUTHORITYWCAL SERVICE BKK-MOBlL01LXsvc- SptSearch sptsearchcon sptadmin c:O-.tladfs4 Oteg •spt- web-mobilnet-full co- .tladfs4 ONsg -spt- web-mob i I net •read sptcachesu s ptcacheru Permissions Full Read Full Read Full Read Full Control Full Control Full Read Full Control Full Read {width="5.645833333333333in" height="5.697916666666667in"}

 

Erfasster Bildschirmausschnitt: 14.12.2018 13:45

 

 

[Webapplication Portal :]{.underline}

 

Computergenerierter Alternativtext: Ü Add Users I X Delete Selected Users \| Edit Permissions Of Selected Users (All zones) (All zones) (All zones) (All zones) (A.ll zones) (All zones) (All zones) (All zones) Displ\" N a me NT AUTHORIT\"LOCAL SERVICE Search Crawding Account Super User (Object Cache) Super Reader (Object Cache) Search Crawding Account Search Craw\'ling Account (ROIe) -Web\_ Portal-Full (Role) Portal-Read Nam e NT AUTHORIT,NLOCAL SERVICE io-#.wlbkk-mobiloitxcfg- sptadmin i • .wlbkk-mobiloitxsvc- sptcachesu ins. wlbkk-mobiloirgvc- sptcacheru sptsearch sptsearchcon c:0-.tladfs4.O \$g-spt- web-portal•full CD- tladfs4.Ol\',sg • spt• web-portal- read Perm Full Read Full Read, Full Control Full Control Full Read Full Read Full Read Full Control Full Read {width="5.03125in" height="3.9375in"}

 

Erfasster Bildschirmausschnitt: 13.11.2018 15:07