The script is available for download from https://gallery.technet.microsoft.com//How-to-check-if-a-SQL-8b6bf4eb. 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 will demonstrate how to check if a SQL Server is running on a physical or virtual machine.
As some people asked how to check if a SQL Server is running on a physical or virtual machine, this script will provide some help.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery