#Connect to SP Online
Connect-SPOService -Url https://ajtech-admin.sharepoint.com -credential ajadmin@ajtech.com
#get site collection that you want to lock/unlock
$site = "https://ajtech.sharepoint.com/sites/test"
#Lock the Site collection
Set-SPOSite -Identity $site -Lockstate "NoAccess"
#Unlock the Site collection
Set-SPOSite -Identity $site -Lockstate "Unlock"
Connect-SPOService -Url https://ajtech-admin.sharepoint.com -credential ajadmin@ajtech.com
#get site collection that you want to lock/unlock
$site = "https://ajtech.sharepoint.com/sites/test"
#Lock the Site collection
Set-SPOSite -Identity $site -Lockstate "NoAccess"
#Unlock the Site collection
Set-SPOSite -Identity $site -Lockstate "Unlock"
No comments:
Post a Comment