PowerShell Script To Make Multiple Sites Mention In Text File To Read Only

The script can be used to change the lockstate of multiple sites mention in text file to read only. All the site collection Urls should be mentioned in Sites.txt file and the script should be run. It would generate an output file with site url and their current lockstate.
  1. Please download the Zip file and Update the sites.txt file with site collection urls whose state needs to be changed to ReadOnly.
  2. Run the LockSites.ps1 file and it would generate an output file in the same folder where script is kept.
Thank you.