Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Find Versions of SQL Server

$
0
0

Summary: Use Windows PowerShell to find versions of SQL Server.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see all the versions of SQL Server I have installed?

Hey, Scripting Guy! Answer Use the provider and a list of instances to look them up as if they were files in a directory:

$instances = @(‘KIRK’,’SPOCK’,’PICARD’,’RIKER’)

$instances | ForEach-Object {Get-Item “SQLSERVER:\SQL\$_\DEFAULT”} | Select-Object Name,VersionString

Image of command output


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>