Share via


Remove-IISConfigAttribute

Letzte Aktualisierung: August 2015

Remove-IISConfigAttribute

Removes a configuration attribute from an IIS configuration section or configuration element attribute.

Syntax

Parameter Set: Default
Remove-IISConfigAttribute [-ConfigElement] <ConfigurationElement> [-AttributeName] <String> [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [ <CommonParameters>]

Detaillierte Beschreibung

The Remove-IISConfigAttribute cmdlet removes a configuration attribute from an Internet Information Services (IIS) configuration section or a configuration element. The value removed is the value for the given ConfigurationElement and not necessarily the effective value for a given site / virtual directory / folder etc. To obtain the effective attribute values, always retrieve the configuration element by specifying the commit path as the deepest level possible. Even the configuration attribute is not defined at that level, the parent attributes are scanned and the effective configuration element is returned. You can then work on this ConfigurationElement to get/set/remove configuration attribute values.

Parameter

-AttributeName<String>

Specifies the name of the attribute that is to be deleted.

Aliase

none

Erforderlich?

true

Position?

2

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ConfigElement<ConfigurationElement>

Specifies the IIS ConfigurationSection or ConfigurationElement from which the matching attribute is to be deleted.

Aliase

none

Erforderlich?

true

Position?

1

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByValue,ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-InformationAction<ActionPreference>

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:

-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend

Aliase

infa

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-InformationVariable<String>

Specifies a variable in which to store an information event message.

Aliase

iv

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.

  • Microsoft.Web.Administration.ConfigurationElement, String

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

Beispiele

Example 1: Remove a configuration attribute from an IIS web site.

This command removes the configuration attribute value for the attribute MaxUrlSegments from the Default Web Site, defaulting to its parent or system wide defaults.

PS C:\> Get-IISSite "Default Web Site" | Get-IISConfigElement -ChildElementName "limits" | Remove-IISConfigAttribute -AttributeName "MaxUrlSegments"

Example 2: Remove configuration attribute values from different parts of the configuration store:

This command removes the global attribute value for ScriptErrorMessage, defaulting to the schema default.

PS C:\> Get-IISConfigSection "system.webServer/asp" | Remove-IISConfigAttribute -AttributeName "ScriptErrorMessage"

Verwandte Themen

Get-IISConfigAttributeValue

Set-IISConfigAttributeValue

IIS Administration Cmdlets