Forum Discussion

TH_'s avatar
TH_
Copper Contributor
Feb 14, 2022
Solved

Read-only after migration

Hi, Looking for a way to place several hundreds of teams (mainly their SharePoint team sites) in read-only state after having migrated these from one tenant to another. Been trying with the fol...
  • AndresGorzelany's avatar
    Feb 15, 2022
    Hello!
    You can't set the LockState to an array of $sites, you will have to do it for each one of them with a for loop, something like

    foreach($site in $sites){

    set-SPOSite $site.Url -LockState "ReadOnly"

    }

Resources