Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Import-DbatoolsConfig on GitHub.
Want to see the Bill Of Health for this command? Check out Import-DbatoolsConfig.
Imports a json configuration file into the configuration system.
Imports a json configuration file into the configuration system.
Import-DbatoolsConfig -Path <String[]>
[-IncludeFilter <String[]>]
[-ExcludeFilter <String[]>]
[-Peek]
[-EnableException]
[<CommonParameters>]
Import-DbatoolsConfig -ModuleName <String>
[-ModuleVersion <Int32>]
[-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory | FileUserLocal | FileUserShared | FileSystem}]
[-EnableException]
[<CommonParameters>]
PS C:\> Import-DbatoolsConfig -Path '.\config.json'
Imports the configuration stored in '.\config.json'
PS C:\> Import-DbatoolsConfig -ModuleName message
Imports all the module specific settings that have been persisted in any of the default file system paths.
The path to the json file to import.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Import configuration items specific to a module from the default configuration paths.
Alias | |
Required | True |
Pipeline | false |
Default Value |
The configuration version of the module-settings to load.
Alias | |
Required | False |
Pipeline | false |
Default Value | 1 |
Where to import the module specific configuration items form.
Only file-based scopes are supported for this.
By default, all locations are queried, with user settings beating system settings.
Alias | |
Required | False |
Pipeline | false |
Default Value | FileUserLocal, FileUserShared, FileSystem |
If specified, only elements with names that are similar (-like) to names in this list will be imported.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Elements that are similar (-like) to names in this list will not be imported.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Rather than applying the setting, return the configuration items that would have been applied.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |