dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Returns the configuration value stored under the specified name. This command is usually only called by functions.



To return the configured value that was assigned to the key ‘path.dbatoolslogpath’

Get-DbaConfigValue -Name path.dbatoolslogpath

Returns the configured value for ‘Default.CoffeeMilk’. If no such value is configured, it returns ‘0’ instead.

Get-DbaConfigValue -Name ‘Default.CoffeeMilk’ -Fallback 0


This command was created by Friedrich Weinmann. You can find Fred on blogging at allthingspowershell.blogspot.de and Tweeting at @FredWeinmann


From PowerShell, execute Get-Help Get-DbaConfigValue -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaConfigValue.ps1 on GitHub

Related commands