Tuesday, 13 May 2014

UnLock the site collection using powershell or Readonly Sitecollection using PowerShell


Site Locks in SharePoint using PowerShell 


Set-SPSite -Identity "<SiteCollection>" -LockState "<State>"

  • <SiteCollection> is the URL of the site collection that you want to lock or unlock.
  • <State> is one of the following values:
    • 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 users from accessing the site collection and its content. Users who attempt to access the site receive an error message.

  1. In Central Administration, on the Application Management page, in the Site Collections section, click Configure quotas and locks.
  2. If the site collection you want is not already selected, in the Site Collection section, on the Site Collection menu, click Change Site Collection. Use the Select Site Collection page to select a site collection.
  1. On the Site Collection Quotas and Locks page, in the Site Lock Information section, select one of the following options:
    • Not locked to unlock the site collection and make it available to users.
    • Adding content prevented to prevent users from adding new content to the site collection. Updates and deletions are still allowed.
    • Read-only (blocks additions, updates, and deletions) to prevent users from adding, updating, or deleting content. Choose whether you want this to be farm administrator controlled or site collection administrator controlled.
    • No access to prevent users from accessing the site collection and its content. Users who attempt to access the site receive an error message.
  2. If you select Adding content preventedRead-only (blocks additions, updates, and deletions), or No access, type a reason for the lock in the Additional lock information box.
  3. Click OK.


No comments:

Post a Comment