< Back

Reset-DbatoolsConfig

Mon Jan 13, 2020 1:31 pm

NAME Reset-DbatoolsConfig



SYNOPSIS

Reverts a configuration item to its default value.





SYNTAX

Reset-DbatoolsConfig [-ConfigurationItem <Sqlcollaborative.Dbatools.Configuration.Config[]>] [-FullName

<System.String[]>] [-EnableException <Switch>] [<CommonParameters>]



Reset-DbatoolsConfig -Module <String> [-Name <String>] [-EnableException <Switch>] [<CommonParameters>]





DESCRIPTION

This command can be used to revert a configuration item to the value it was initialized with.



Generally, this amounts to reverting it to its default value.



In order for a reset to be possible, two conditions must be met:



- The setting must have been initialized.



- The setting cannot have been enforced by policy.





PARAMETERS

-ConfigurationItem [<Sqlcollaborative.Dbatools.Configuration.Config[]>]

A configuration object as returned by Get-DbatoolsConfig.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-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



-FullName [<System.String[]>]

The full name of the setting to reset, offering the maximum of precision.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Module [<String>]

The name of the module, from which configurations should be reset.

Used in conjunction with the -Name parameter to filter a specific set of items.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Name [<String>]

Used in conjunction with the -Module parameter to select which settings to reset using wildcard comparison.



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:\\>Reset-DbatoolsConfig -Module MyModule



Resets all configuration items of the MyModule to default.

-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-DbatoolsConfig | Reset-DbatoolsConfig



Resets ALL configuration items to default.

-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Reset-DbatoolsConfig -FullName MyModule.Group.Setting1



Resets the configuration item named 'MyModule.Group.Setting1'.



RELATED LINKS

https://dbatools.io/Reset-DbatoolsConfig