This respository has all the PowerShell scripts used in the Blog https://msisgreat.net
Preparing the CSOM for the PowerShell:
Prepare to run the PowerShell CSOM script to update the View CAML. Download the CSOM dll from Nuget.org https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.7414.1200 Use the Manual download link at the right side of the page. The downloaded file will be microsoft.sharepointonline.csom.16.1.7414.1200.nupkg based on the version you download. Unzip the file to the folder. You can change the file extension to .zip and unzip all files. Use the .net45 folder libraries for the CSOM PowerShell.
All the ps1 file used in this blog uses the folder "C:\Documents\PS\CSOM" to unzip the CSOM client dll files