However, doing it via Central Administration vs via Powershell has a slight difference. If you create your site collection via the web UI you get a handful of SharePoint groups automatically created, but not if you create it via Powershell.
With the Powershell approach, there are "No predefined Groups in sitecollection created with Powershell". All you need to do is to call the CreateDefaultAssociatedGroups() method of the SPWeb object.
New-SPSite -Url $sp_sc_url -Name $sp_sc_name -Template $sp_sc_template -OwnerAlias $sp_sc_owner -SecondaryOwnerAlias $sp_sc_owner2 -Language $sp_sc_language
$sp_web = Get-SPWeb $sp_sc_url
$sp_web.CreateDefaultAssociatedGroups($sp_sc_owner, $sp_sc_owner2, "")
No comments:
Post a Comment