Remove-IISConfigAttribute

Mis à jour: août 2015

Remove-IISConfigAttribute

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

Syntaxe

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

Description détaillée

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.

Paramètres

-AttributeName<String>

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

Alias

none

Requis ?

true

Position ?

2

Valeur par défaut

none

Accepter l'entrée de pipeline ?

true(ByPropertyName)

Accepter les caractères génériques ?

false

-ConfigElement<ConfigurationElement>

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

Alias

none

Requis ?

true

Position ?

1

Valeur par défaut

none

Accepter l'entrée de pipeline ?

true(ByValue,ByPropertyName)

Accepter les caractères génériques ?

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

Alias

infa

Requis ?

false

Position ?

named

Valeur par défaut

none

Accepter l'entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-InformationVariable<String>

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

Alias

iv

Requis ?

false

Position ?

named

Valeur par défaut

none

Accepter l'entrée de pipeline ?

false

Accepter les caractères génériques ?

false

<CommonParameters>

Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d'informations, consultez  . about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entrées

Le type d'entrée correspond au type des objets que vous pouvez adresser à l'applet de commande.

  • Microsoft.Web.Administration.ConfigurationElement, String

Sorties

Le type de sortie correspond au type des objets que l'applet de commande émet.

Exemples

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"

Rubriques connexes

Get-IISConfigAttributeValue

Set-IISConfigAttributeValue

IIS Administration Cmdlets