< Back

Remove-CDotNetAppSetting

Sun Jan 12, 2020 10:51 pm

NAME Remove-CDotNetAppSetting



SYNOPSIS

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





SYNTAX

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

[<CommonParameters>]





DESCRIPTION

The `Remove-CDotNetAppSetting` 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:



* .NET 2.0 32-bit (switches -Clr2 -Framework)

* .NET 2.0 64-bit (switches -Clr2 -Framework64)

* .NET 4.0 32-bit (switches -Clr4 -Framework)

* .NET 4.0 64-bit (switches -Clr4 -Framework64)



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-CDotNetAppSetting` was added in Carbon 2.2.0.





PARAMETERS

-Name <String>

The name of the app setting to remove.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



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



>Remove-CDotNetAppSetting -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`









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



>Remove-CDotNetAppSetting -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`











RELATED LINKS

Set-CDotNetAppSetting

Set-CDotNetConnectionString