< Back

Reset-PSFConfig

Sun Jan 19, 2020 6:44 pm

NAME Reset-PSFConfig



SYNOPSIS

Reverts a configuration item to its default value.





SYNTAX

Reset-PSFConfig [-ConfigurationItem <Config[]>] [-FullName <String[]>] [-EnableException] [-WhatIf] [-Confirm]

[<CommonParameters>]



Reset-PSFConfig -Module <String> [-Name <String>] [-EnableException] [-WhatIf] [-Confirm] [<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 <Config[]>

A configuration object as returned by Get-PSFConfig.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-FullName <String[]>

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



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

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? true

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



-EnableException [<SwitchParameter>]

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 False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

If this switch is enabled, no actions are performed but informational messages will be displayed that explain

what would happen if the command were to run.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If this switch is enabled, you will be prompted for confirmation before executing any operations that change

state.



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



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Reset-PSFConfig -Module MyModule



Resets all configuration items of the MyModule to default.









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



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



Resets ALL configuration items to default.









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



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



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











RELATED LINKS