Wednesday, March 20, 2013

Pre-create my site

How to create my site in SharePoint 2010 by powershell or STSADM?
  1. Use the following deprecated STSADM command:
    STSADM -o createsite see also http://technet.microsoft.com/en-us/library/cc262594(office.12).aspx
    (for MySite use SPSPERS#0 for the site template)
  2. Or Use the following Powershell script:
    Get-SPWebTemplate
    $template = Get-SPWebTemplate "SPSPERS#0"
    New-SPSite -Url "<URL for the new site collection>" -OwnerAlias "<domain\user>" -Template $template
    see also http://technet.microsoft.com/en-us/library/cc263094.aspx

No comments:

Post a Comment