Remove-IISConfigElement
Removes a specified configuration element.
Syntax
Remove-IISConfigElement
[-ConfigElement] <ConfigurationElement>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-IISConfigElement cmdlet deletes a specified configuration element. This affectively causes that configuration element to inherit from the parents, if any, or use the default value as described in the schema. If the configuration element that is being removed is a collection element, it is removed from the collection, in which case the functionality is equivalent to Remove-IISConfigCollectionElement.
Examples
Example 1: Remove a configuration element from an IIS website
PS C:\> Get-IISConfigSection "system.webServer/defaultDocument" -CommitPath "Default Web Site" | Remove-IISConfigElement
This command removes a configuration section from a web configuration contained in IIS website Default Web Site.
Parameters
-ConfigElement
Specifies the Internet Information Services (IIS) ConfigurationSection or ConfigurationElement to be deleted.
Type: | ConfigurationElement |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Related Links
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈