The script is available for download from https://gallery.technet.microsoft.com//How-to-set-the-compatibilit-f055ef26. 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 PowerShell script shows how to use PowerShell module to set the compatibility mode for application.
Windows 8/8.1 has great built in app compatibility that enables apps designed for Windows 7 or earlier Windows versions to work great on Windows 8 automatically. It is easily if we just configure an application. However, if you plan to configure it on several hundred computers, it would be convenient to use this script.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery