< Back
Import-DbatoolsConfig
Post
NAME Import-DbatoolsConfig
SYNOPSIS
Imports a json configuration file into the configuration system.
SYNTAX
Import-DbatoolsConfig -Path <System.String[]> [-IncludeFilter <System.String[]>] [-ExcludeFilter
<System.String[]>] [-Peek <Switch>] [-EnableException <Switch>] [<CommonParameters>]
Import-DbatoolsConfig -ModuleName <String> [-ModuleVersion <Int>] [-Scope
<Sqlcollaborative.Dbatools.Configuration.ConfigScope>] [-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Imports a json configuration file into the configuration system.
PARAMETERS
-EnableException [<Switch>]
This parameters disables user-friendly warnings and enables the throwing of exceptions.
This is less user friendly, but allows catching exceptions in calling scripts.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ExcludeFilter [<System.String[]>]
Elements that are similar (-like) to names in this list will not be imported.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-IncludeFilter [<System.String[]>]
If specified, only elements with names that are similar (-like) to names in this list will be imported.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ModuleName [<String>]
Import configuration items specific to a module from the default configuration paths.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ModuleVersion [<Int>]
The configuration version of the module-settings to load.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Path [<System.String[]>]
The path to the json file to import.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Peek [<Switch>]
Rather than applying the setting, return the configuration items that would have been applied.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Scope [<Sqlcollaborative.Dbatools.Configuration.ConfigScope>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Module
Author: Friedrich Weinmann (@FredWeinmann)
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-DbatoolsConfig -Path '.\\config.json'
Imports the configuration stored in '.\\config.json'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Import-DbatoolsConfig -ModuleName message
Imports all the module specific settings that have been persisted in any of the default file system paths.
RELATED LINKS
https://dbatools.io/Import-DbatoolsConfig
SYNOPSIS
Imports a json configuration file into the configuration system.
SYNTAX
Import-DbatoolsConfig -Path <System.String[]> [-IncludeFilter <System.String[]>] [-ExcludeFilter
<System.String[]>] [-Peek <Switch>] [-EnableException <Switch>] [<CommonParameters>]
Import-DbatoolsConfig -ModuleName <String> [-ModuleVersion <Int>] [-Scope
<Sqlcollaborative.Dbatools.Configuration.ConfigScope>] [-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Imports a json configuration file into the configuration system.
PARAMETERS
-EnableException [<Switch>]
This parameters disables user-friendly warnings and enables the throwing of exceptions.
This is less user friendly, but allows catching exceptions in calling scripts.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ExcludeFilter [<System.String[]>]
Elements that are similar (-like) to names in this list will not be imported.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-IncludeFilter [<System.String[]>]
If specified, only elements with names that are similar (-like) to names in this list will be imported.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ModuleName [<String>]
Import configuration items specific to a module from the default configuration paths.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ModuleVersion [<Int>]
The configuration version of the module-settings to load.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Path [<System.String[]>]
The path to the json file to import.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Peek [<Switch>]
Rather than applying the setting, return the configuration items that would have been applied.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Scope [<Sqlcollaborative.Dbatools.Configuration.ConfigScope>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Module
Author: Friedrich Weinmann (@FredWeinmann)
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-DbatoolsConfig -Path '.\\config.json'
Imports the configuration stored in '.\\config.json'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Import-DbatoolsConfig -ModuleName message
Imports all the module specific settings that have been persisted in any of the default file system paths.
RELATED LINKS
https://dbatools.io/Import-DbatoolsConfig