Thursday, December 17, 2015

Setsitelock: Stsadm operation

Sets a value that specifies whether the site collection is locked and unavailable for read or write access. This operation should be used in conjunction with the Getsitelock operation. For more information, see the Examples section.

stsadm -o setsitelock
   -url <URL name>
   -lock {none | noadditions | readonly | noaccess}

None: Sets the site collection to unlock.
Noadditions: Permits changes that reduce the size of the data.
For example, if you had an announcement list item whose body consisted of 50 characters, you could successfully edit the list item so that the body was reduced to 25 characters. However, if you tried to edit the list item so that they body was increased to 100 characters, that would be blocked.
Readonly: Sets the site collection to read-only.
Noaccess: Sets the site collection unavailable to all users.

To determine the lock status of the site, you can use the following getsitelock syntax:
stsadm -o getsitelock -url http://server_name
Once the lock status of the site collection is determined, you can use the noaccess parameter of the setsitelock operation to lock out all users to the site:
stsadm -o setsitelock -url http://server_name -lock noaccess

No comments:

Post a Comment