Home > SharePoint Online Migration Process > Migration Execution > 6. Set the source site to read only
Export to PDFBefore executing the final delta/incremental migration, make sure that no data will be changed or created in the source during the migration to enforce the data consistency.
#Set Parameters
$AdminCenterURL="https://contoso-admin.sharepoint.com"
$SiteURL = ""
#Connect to SharePoint Online
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)
#PowerShell to set onedrive for business site to read only
Set-SPOSite -Identity $SiteURL -LockState ReadOnly
#Unlock site from read only mode
Set-SPOSite -Identity $SiteURL -LockState Unlock