Remove-IISConfigCollectionElement

Remove-IISConfigCollectionElement

Removes a configuration element object from an IIS configuration collection.

構文

Parameter Set: Default
Remove-IISConfigCollectionElement [-ConfigCollection] <ConfigurationElementCollection> [[-ConfigAttribute] <Hashtable> ] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Remove-IISConfigCollectionElement cmdlet removes a ConfigurationElement from a given Internet Information Services (IIS) ConfigurationCollection.

パラメーター

-ConfigAttribute<Hashtable>

Specifies a hashtable of the attributes to match while searching for the configuration elements to delete in the collection. For the configuration attributes that are not specified, no filtering will be done. If you omit this parameter, all the elements in the collection are deleted.

Aliases

none

必須/オプション

false

位置

2

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ConfigCollection<ConfigurationElementCollection>

Specifies the ConfigurationCollection from which the matching ConfigurationElements will be removed.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

true(ByValue,ByPropertyName)

ワイルドカード文字の受け入れ

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

Aliases

infa

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InformationVariable<String>

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

Aliases

iv

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.Web.Administration.ConfigurationElementCollection, System.Collections.Hashtable

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

使用例

Example 1: Remove a file name from the list of default documents

This command removes a configuration entry from the list of default documents.

PS C:\> $ConfigSection = Get-IISConfigSection -SectionPath "system.webServer/defaultDocument"
PS C:\> Get-IISConfigCollection $ConfigSection "Files" | Remove-IISConfigCollectionElement  -ConfigAttribute @{"Value" = "MyDefDoc.htm"}

関連項目

Get-IISConfigCollectionElement

New-IISConfigCollectionElement

IIS Administration Cmdlets