Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

List SQL Server Instances using Powershell and Get-ItemProperty

04 February,2012 by Tom Collins

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


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on List SQL Server Instances using Powershell and Get-ItemProperty


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer