2.3 移行元 OneDrive サイトを読み取り専用に設定する

最終の増分移行を実行する前に、データの一貫性を確保するため、移行中に移行元でデータが変更・作成されないことを確認してください。

    OneDrive サイトを読み取り専用に設定するには、PowerShell を使用して以下のスクリプトを実行してください。

#Set Parameters

$AdminCenterURL="https://contoso-admin.sharepoint.com"

$SiteURL = "https://contoso-my.sharepoint.com/personal/user_contoso_onmicrosoft_com"

#Connect to SharePoint Online

Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)

#PowerShell to set sharepoint online site to read only

Set-SPOSite -Identity $SiteURL -LockState ReadOnly

    OneDrive サイトのロックを解除するには、PowerShell を使用して以下のスクリプトを実行してください。

#Unlock site from read only mode

Set-SPOSite -Identity $SiteURL -LockState Unlock