commands

^

Unregister-DbatoolsConfig

Author Friedrich Weinmann (@FredWeinmann)
Availability Windows, Linux, macOS

 

Synopsis

Removes registered configuration settings.

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.

Syntax

Unregister-DbatoolsConfig
    [-ConfigurationItem <Config[]>]
    [-FullName <String[]>]
    [-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory | FileUserLocal | FileUserShared | FileSystem}]
    [<CommonParameters>]

Unregister-DbatoolsConfig -Module <String>
    [-Name <String>]
    [-Scope {UserDefault | UserMandatory | SystemDefault | SystemMandatory | FileUserLocal | FileUserShared | FileSystem}]
    [<CommonParameters>]

 

Examples

 

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.

Required Parameters

-Module

The module, amongst which settings should be unregistered.

Alias
Required True
Pipeline false
Default Value

Optional Parameters

-ConfigurationItem

A configuration object as returned by Get-DbatoolsConfig.

Alias
Required False
Pipeline true (ByValue)
Default Value
-FullName

The full name of the configuration setting to purge.

Alias
Required False
Pipeline true (ByValue)
Default Value
-Name

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

Alias
Required False
Pipeline false
Default Value *
-Scope

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.

Alias
Required False
Pipeline false
Default Value UserDefault

 

Want to see the source code for this command? Check out Unregister-DbatoolsConfig on GitHub.
Want to see the Bill Of Health for this command? Check out Unregister-DbatoolsConfig.