sharepoint online – several site collection add into “Readonly” mode using powershell script


We have 100+ site collections on csv file and we need to mark all sites into “Read Only” mode access based on csv file using powershell script. Anyone suggestion highly appreciate. we am trying below script but facing some issue. SharePoint 2013 environment


Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$SitesColl = import-csv “C:Usersxxxxxxxtest.csv”
foreach($Site in $SitesColl)
{
Set-SPSite -Identity “$site.Url” -LockState “ReadOnly”
}

Error :Set-SPSite : Cannot find an SPSite object with Id or Url:
@{Url=http://sharepoint.test.com/sites/xx}.Url.
At C:Usersxxxxxxxscript.ps1:5 char:3

SPCmdletSetSite) (Set-SPSite), SPCmdletPipeBindException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetSite