Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Remove-IISConfigElement

Brian Lich|Last Updated: 3/30/2017

SYNOPSIS

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
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: 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
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Web.Administration.ConfigurationElement

OUTPUTS

NOTES

Get-IISConfigElement

Remove-IISConfigCollectionElement

IIS Administration Cmdlets for Windows PowerShell

© 2017 Microsoft