Welcome to the navigation

Incididunt ut anim magna est dolor aute velit sint ullamco eu ex sed laborum, qui nulla sit nostrud ut consequat, aliquip cillum non et eiusmod. Veniam, do sunt adipisicing ullamco in excepteur aliqua, ad magna nisi esse consectetur id dolore duis nulla eu et aliquip ex cillum officia est ipsum

Yeah, this will be replaced... But please enjoy the search!

Get SharePoint ConnectionString using PowerShell

Ever needed the connectionstring to a SharePoint database but really disliked to use regedit.exe? Here is how you'll get it using PowerShell

Note! This is for SharePoint 2015, change the version number for other versions.

Get-Item 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDB'

This should output something like this

To get the dsn alone you can use the GetItemProperty instead

(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDB').dsn

Cheers.