I faced a quite interesting situation today where I wanted to put my SharePoint side down, I mean I wanted to stop users from accessing it apart from the site collection admin. Removing User's permission was a straight forward approach but my site had 100+ groups and I'll need to reconfigure them again after the downtime.

So I wanted to know if there's anyway to make a SharePoint Unavailable for a specific period. I am currently using Office 365 though tips for SharePoint 2013 on premise would also be appreciated.

  • Don't you want users to see the site completely? Do you want users to see read-only site?
    – RedsDevils
    Commented Jul 9, 2015 at 15:22
  • No I want to complete disable the site. So that they can't access it.
    – Taran Goel
    Commented Jul 9, 2015 at 15:27

3 Answers 3


Using Set-SPOSite, you can lock down the Office 365 site collection with the LockState parameter.

Set-SPOSite -Identity https://contoso.sharepoint.com -LockState NoAccess

Optionally, Set-SPOTenant can be used to redirect users from the locked site to another location.

Set-SPOTenant -NoAcessRedirectUrl 'http://www.contoso.com'

You can do this with a powershell cmdlet

Open powershell as administrator and run the following commands:

asnp microsoft.sharepoint.powershell -ea 0

Set-SPSite -Identity "" -LockState ""

-Identity needs to be the URL of the site collection you want to lock and -LockState can be one of 4 options:

  • Unlock Unlocks the site
  • NoAdditions No new content can be added but updates and deletions are allowed
  • ReadOnly No edits can be performed
  • NoAccess Site Locked to non-admins
  • 1
    This will not work for SharePoint Online. Server side code cannot be used, only client side.
    – wjervis
    Commented Jul 9, 2015 at 16:45

I don't think their is any lock type available which will disable all users from the site collection except Site Admins.

Couple of workaorund i am guessing may work.

  • You alrady know about it, remove all users from site collection, after the job done, re-add them.
  • On-Prem, if you are using the HNSC collection, just change the URL of the site collection and dont tell end users, remove the old url. Once you dont you can revert your changes. (i am not sure you can change the url on Office 365)
  • ON-Prem, if you are using FQDN for the web app then remove the AAM settings and access the site using server name and port number....But this will hurt all the site collections in the Web app.
  • take the backup of site collection, restore with different url...mark the old site as no access...do the work on restored site, once done...restore that site on old and let the user access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.