Remove an app setting from the .NET machine.config file.
Remove-DotNetAppSetting [-Name] <String> [-Framework] [-Framework64] [-Clr2] [-Clr4] [-WhatIf] [-Confirm] [<CommonParameters>]
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.
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 |
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 |
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 |
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 |
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 . |
Remove-DotNetAppSetting -Name ExampleUrl -Framework -Framework64 -Clr2 -Clr4
Remvoes the ExampleUrl
app setting from the following machine.config files:
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config
%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config
Remove-DotNetAppSetting -Name ExampleUrl -Framework64 -Clr4
Sets the ExampleUrl app setting in the following machine.config file:
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\machine.config