SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

List SQL Server Instances using Powershell and Get-ItemProperty

This post explains how to list SQL Server Instances installed on the current server, using the Powershell Get-ItemProperty Cmdlet.

The Get-ItemProperty Cmdlet gets the properties of a specific item.

In this example, the command displays the Name and Data from the registry entries in the SQL registry subkey.Notice the  Powershell drive : HKLM.  It’s mapped to the HKEY_LOCAL_MACHINE .


Get-ItemProperty 'HKLM:\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL'


See Also

SQL Server – Send email using Powershell

SQL Server Version with Powershell


Leave a comment on the original post [www.sqlserver-dba.com, opens in a new window]

Loading comments...