< Back

Unregister-DbatoolsConfig

Mon Jan 13, 2020 6:19 pm

NAME Unregister-DbatoolsConfig



SYNOPSIS

Removes registered configuration settings.





SYNTAX

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

<System.String[]>] [-Scope <Sqlcollaborative.Dbatools.Configuration.ConfigScope>] [<CommonParameters>]



Unregister-DbatoolsConfig -Module <String> [-Name <String>] [-Scope

<Sqlcollaborative.Dbatools.Configuration.ConfigScope>] [<CommonParameters>]





DESCRIPTION

Removes registered configuration settings.



This function can be used to remove settings that have been persisted for either user or computer.



Note: This command has no effect on configuration settings currently in memory.





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



-FullName [<System.String[]>]

The full name of the configuration setting to purge.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Module [<String>]

The module, amongst which settings should be unregistered.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Name [<String>]

The name of the setting to unregister.

For use together with the module parameter, to limit the amount of settings that are unregistered.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Scope [<Sqlcollaborative.Dbatools.Configuration.ConfigScope>]

Settings can be set to either default or enforced, for user or the entire computer.

By default, only DefaultSettings for the user are unregistered.

Use this parameter to choose the actual scope for the command to process.



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:\\>Get-DbatoolsConfig | Unregister-DbatoolsConfig



Completely removes all registered configurations currently loaded in memory.

In most cases, this will mean removing all registered configurations.

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



PS C:\\>Unregister-DbatoolsConfig -Scope SystemDefault -FullName 'MyModule.Path.DefaultExport'



Unregisters the setting 'MyModule.Path.DefaultExport' from the list of computer-wide defaults.

Note: Changing system wide settings requires running the console with elevation.

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



PS C:\\>Unregister-DbatoolsConfig -Module MyModule



Unregisters all configuration settings for the module MyModule.



RELATED LINKS

https://dbatools.io/Unregister-DbatoolsConfig