Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on building some documentation across my systems and planned on simply using Powershell to script out the legwork of what I wanted to do. While that's going all well and good, I ran into an issue with my SQL Server registry entries. The problem being that some of my SQL servers have all of their registry values while some don't.

For example, I'm pulling down the SQL Shared Features entry so I know where that directory is on all servers. Now some of them are pulling data back (E:\yada\yada) while others aren't pulling anything back. After further investigation, I have noticed that several of my SQL servers don't have the required registration data saved within the registry. This happens with several different registry entries that should be there.

Any reason it's like this?

share|improve this question

Instead of reinventing the wheel (there is a cost associated to it), use SQL PowerDoc written by kendalvandyke. Its a powershell based solution.

Documentation can be found here.

I have noticed that several of my SQL servers don't have the required registration data saved within the registry.

SQL server will have everything in the registry settings. For shared Features, I believe the registry is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-518\Components\0D1F366D0FE0E404F8C15EE4F1C15094

Refer to File Locations for Default and Named Instances of SQL Server

share|improve this answer

Registry keys can change with all software products between major versions or even with a service pack. Instead of trying to pull the values from searching the registry you might consider just using SMO.

For instance to find the directory path you are looking for simply use the following:

$s = new-object MyServer

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.