次の方法で共有


New-SPSite and New-SPClaimPrincipal

Self note: new a new site and set my account as an owner:

 

$web = "https://localdev/sites/site1"

$user = New-SPClaimsPrincipal -IdentityType WindowsSamAccountName -Identity $(whoami)

New-SPSite -Name "site1" -Url $web -OwnerAlias $user -Template "CMSPUBLISHING#0"