The script is available for download from https://gallery.technet.microsoft.com//How-to-query-the-progress-53e7f89b. 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 script is to query the progress of backup process currently running in SQL Server.
As some people asked how to get the backup status in SQL Server before shutting down SQL Server, this script may provide some help.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery