I have a list of a couple of thousand sites within our collection that are orphaned or have been inactive for a year or better. Some of them have Owners listed and some do not.
Reading through a few other forums and posts, it seems the Set-SPSite only works on the entire collection. Would it work on just the array of URLs? I need to lock access to the sites before we begin reviewing for records retention. I am thinking of the following.
#Set-SPSite -Identity https://<collection>.sharepoint.com -LockState NoAccess
Can I set the Identity to the $sites variable that is the uploaded CSV array?
$sites = import-csv "C:\<MyCSV>\Pilot-Remediation.csv"
#$Header = "URL"
Any help would be greatly appreciated.