Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Export-DbatoolsConfig on GitHub.
Want to see the Bill Of Health for this command? Check out Export-DbatoolsConfig.
Exports configuration items to a Json file.
Exports configuration items to a Json file.
Export-DbatoolsConfig -FullName <String>
[-OutPath] <String>
[-SkipUnchanged]
[-EnableException]
[<CommonParameters>]
Export-DbatoolsConfig -Module <String>
[[-Name] <String>]
[-OutPath] <String>
[-SkipUnchanged]
[-EnableException]
[<CommonParameters>]
Export-DbatoolsConfig -Config <Config[]>
[-OutPath] <String>
[-SkipUnchanged]
[-EnableException]
[<CommonParameters>]
Export-DbatoolsConfig -ModuleName <String>
[-ModuleVersion <Int32>]
[-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory | FileUserLocal | FileUserShared | FileSystem}]
[-SkipUnchanged]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbatoolsConfig | Export-DbatoolsConfig -OutPath '~/export.json'
Exports all current settings to json.
PS C:\> Export-DbatoolsConfig -Module message -OutPath '~/export.json' -SkipUnchanged
Exports all settings of the module 'message' that are no longer the original default values to json.
Select the configuration objects to export by filtering by their full name.
Alias | |
Required | True |
Pipeline | false |
Default Value |
Select the configuration objects to export by filtering by their module name.
Alias | |
Required | True |
Pipeline | false |
Default Value |
The configuration object(s) to export.
Returned by Get-DbatoolsConfig.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Exports all configuration pertinent to a module to a predefined path.
Exported configuration items include all settings marked as 'ModuleExport' that have been changed from the default value.
Alias | |
Required | True |
Pipeline | false |
Default Value |
The path (filename included) to export to.
Will fail if the folder does not exist, will overwrite the file if it exists.
Alias | |
Required | True |
Pipeline | false |
Default Value |
Select the configuration objects to export by filtering by their name.
Alias | |
Required | False |
Pipeline | false |
Default Value | * |
The configuration version of the module-settings to write.
Alias | |
Required | False |
Pipeline | false |
Default Value | 1 |
Which predefined path to write module specific settings to.
Only file scopes are considered.
By default it writes to the suer profile.
Alias | |
Required | False |
Pipeline | false |
Default Value | FileUserShared |
If set, configuration objects whose value was not changed from its original value will not be exported.
(Note: Settings that were updated with the same value as the original default will still be considered changed)
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 |