Hello,
I need to run a powershell script against my environment collecting various pieces of Server information into a single csv. The particular piece I am having trouble with is SQL Server Editions.
My server environment contains Microsoft SQL 2000 - 2012 servers and in some cases multiple instances per server. Also I do not have permissions to connect to many servers as well as others do not have or have running a SQL browser service.
I have the following code that I use to grab actual SQL servers that were:
$Service = Get-WmiObject -Class Win32_Service -ComputerName $Computer | Select Caption, State, PathName | ? {$_.PathName -like "*sqlservr.exe*" -and $_.Caption -notlike "*$*" -and $_.Caption -notlike "*#*"}
Using the Get-ItemProperty for sqlservr.exe I can figure out the version number per service,
But I can't seem to find a way to get the edition of the SQL Instance...
Thank you for your help