PowerShell – Get All SQL Instances On Server Writer #1, 2016-04-27 This script will return all SQL instances running on a server or list of servers. cls Import-Module -Name SQLPS -DisableNameChecking $servers = "SERVER_NAME", "SERVER_NAME_2", "ETC"; foreach($server in $servers) { $path = "SQLServer:\SQL\" + $server; $instances = Get-ChildItem -Path $path; $instances; } Powershell instancespowershell