Remove-DotNetAppSetting

Remove an app setting from the .NET machine.config file.

Syntax

Remove-DotNetAppSetting [-Name] <String> [-Framework] [-Framework64] [-Clr2] [-Clr4] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Remove-DotNetAppSetting removes an app setting from one or more of the .NET machine.config file. The app setting can be removed from up to four different machine.config files:

Any combination of Framework and Clr switch can be used, but you MUST supply one of each.

If the app setting doesn't exist in the machine.config, nothing happens.

Remove-DotNetAppSetting was added in Carbon 2.2.0.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The name of the app setting to remove.

true false
Framework SwitchParameter

Remove the app setting from a 32-bit machine.config. Must be used with one or both of the Clr2 and Clr4 switches to control which machine.config files to operate on.

false false False
Framework64 SwitchParameter

Remove the app setting from a 64-bit machine.config. Ignored if running on a 32-bit operating system. Must be used with one or both of the Clr2 and Clr4 switches to control which machine.config files to operate on.

false false False
Clr2 SwitchParameter

Remove the app setting from a .NET 2.0 machine.config. Must be used with one or both of the Framework and Framework64 switches to control which machine.config files to operate on.

false false False
Clr4 SwitchParameter

Remove the app setting from a .NET 4.0 machine.config. Must be used with one or both of the Framework and Framework64 switches to control which machine.config files to operate on.

false false False
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Remove-DotNetAppSetting -Name ExampleUrl -Framework -Framework64 -Clr2 -Clr4

Remvoes the ExampleUrl app setting from the following machine.config files:

EXAMPLE 2

Remove-DotNetAppSetting -Name ExampleUrl -Framework64 -Clr4

Sets the ExampleUrl app setting in the following machine.config file: