Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbatoolsConfigValue on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbatoolsConfigValue.
Returns the configuration value stored under the specified name.
Returns the configuration value stored under the specified name.
It requires the full name (
Get-DbatoolsConfigValue
[-FullName] <String>
[[-Fallback] <Object>]
[-NotNull]
[<CommonParameters>]
PS C:\> Get-DbatoolsConfigValue -Name 'System.MailServer'
Returns the configured value that was assigned to the key 'System.MailServer'
PS C:\> Get-DbatoolsConfigValue -Name 'Default.CoffeeMilk' -Fallback 0
Returns the configured value for 'Default.CoffeeMilk'. If no such value is configured, it returns '0' instead.
The full name (
Alias | Name |
Required | True |
Pipeline | false |
Default Value |
A fallback value to use, if no value was registered to a specific configuration element.
This basically is a default value that only applies on a "per call" basis, rather than a system-wide default.
Alias | |
Required | False |
Pipeline | false |
Default Value |
By default, this function returns null if one tries to retrieve the value from either a Configuration that does not exist or a Configuration whose value was set to null.
However, sometimes it may be important that some value was returned.
By specifying this parameter, the function will throw an error if no value was found at all.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |