SharePoint 2010 Windows PowerShell Commands - II

Some more PowerShell Commands

Site Collection Commands

Create Site Collection :

Get-SPWebTemplate
$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "" -OwnerAlias "" -Template $template

Delete Site Collection :

Remove-SPSite -Identity "URL of site Collection" -GradualDelete

Change Site collection Quotas :

Set-SPSite -Identity "SiteCollection Url" -MaxSize Quota

Add site Collection Administrators :


Set-SPSite -Identity "" -SecondaryOwnerAlias ""

Lock or unlock a site collection :

Set-SPSite -Identity "Site Collection Url" -LockState ""

is one of the following vales :

# Unlock: To unlock the site collection and make it available to users.

# NoAdditions: To prevent users from adding new content to the site collection. Updates and deletions are still allowed.

# ReadOnly: To prevent users from adding, updating, or deleting content.

# NoAccess: To prevent access to content completely. Users who attempt to access the site receive an access-denied message.

Create a site :


New-SPSite "http://sitecollection/sites/Subsite -OwnerAlias "DOMAIN\UserName" –Language 1033

See more Commands @ SharePoint 2010 Windows PowerShell Commands - I

0 comments:

Post a Comment

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com