Insights

My Blog

New-SPSite and New-SPClaimPrincipal

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

 

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

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

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