Main | Contact | Blog | Documentation

PowerShell Framework

The project dedicated to empowering your PowerShell scripting.

Persistence: Purge


Shows how to get rid of persisted settings.


Having settings that are automatically applied each time is all nice and dandy. Until you want to get rid of them, that is.

Diggig through the registry and file system yourself isn’t exactly convenient though. Thus the command Unregister-PSFConfig was born:

# Remove a single setting
Unregister-PSFConfig -FullName MyModule.Smtp.Server

# Clear all settings of the module
Unregister-PSFConfig -Module MyModule

Note: This does not change settings in the current session. It merely prevents future sessions from receiving these sessions.


By default, the user’s registry node is targeted. Using the -Scope parameter, any (or all) other locations can be targeted.


Back to Configuration

Version 1.0
Written on: 2018-05-23
Updated on: 2018-06-06