The script is available for download from https://gallery.technet.microsoft.com//How-to-change-the-9e7c7eeb. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This T-SQL script will demo how to change the collation of all databases in a SQL Server instance to that of the server.
There are some people asking how to change the database collation for all databases. This script will provide some help in this respect.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery