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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應