Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
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.
Removes persisted dbatools configuration settings from registry and configuration files.
Removes dbatools configuration settings that have been persisted to Windows registry or JSON configuration files. This lets you clean up module settings that were previously saved using Register-DbatoolsConfig, removing them from user profiles or system-wide storage locations.
The function handles settings stored in multiple persistence scopes including user-specific registry entries, computer-wide registry settings, and JSON configuration files in various user and system directories. You can target specific settings by name or module, or remove entire configuration groups.
Note: This command only removes persisted settings and has no effect on configuration values currently loaded in PowerShell memory.
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>]
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.
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.
PS C:\> Unregister-DbatoolsConfig -Module MyModule
Unregisters all configuration settings for the module MyModule.
Specifies the module name to target for configuration removal.
Use this to remove all configuration settings belonging to a specific dbatools module or component.
Alias | |
Required | True |
Pipeline | false |
Default Value |
Specifies configuration objects to remove from persistent storage, as returned by Get-DbatoolsConfig.
Use this when you want to unregister specific settings already identified through Get-DbatoolsConfig.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
Specifies the complete name of the configuration setting to remove from persistent storage.
Use this when you know the exact setting name in the format 'module.category.setting'.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
Specifies the setting name pattern to match within the targeted module. Supports wildcards.
Use with the Module parameter to narrow down which settings to remove, defaults to '*' to match all settings.
Alias | |
Required | False |
Pipeline | false |
Default Value | * |
Specifies which configuration storage locations to target for removal: user settings, computer-wide settings, or file-based configurations.
Defaults to UserDefault which removes settings from the current user's registry. Use SystemDefault to remove computer-wide settings (requires elevation).
Alias | |
Required | False |
Pipeline | false |
Default Value | UserDefault |