top of page
Search
PowerShell – List all my SQL instances on a list of computers, non-Registry method
Wow, I found so many nice posts on how to do this using registry queries, but seeing as I have a list of over 100 servers on geographic disparate areas, the scripts were running for ages. So I though why not just use Get-WmiObject. So here is the juicy bits $inputfile = "$scriptlocation$serverlistfile"; $servers = get-content $inputfile; #Create container $SQLservers = @() ; foreach($server in $servers) { if($server.length -gt 4) { $Computer = $server -replace '(.*?)\..+',

sqldba
Oct 25, 20131 min read
bottom of page

