Get-IisHttpHeader

Gets the HTTP headers for a website or directory under a website.

Syntax

Get-IisHttpHeader [-SiteName] <String> [[-VirtualPath] <String>] [[-Name] <String>] [<CommonParameters>]

Description

For each custom HTTP header defined under a website and/or a sub-directory under a website, returns a Carbon.Iis.HttpHeader object. This object has two properties:

Beginning with Carbon 2.0.1, this function is available only if IIS is installed.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String

The name of the website whose headers to return.

true false
VirtualPath String

The optional path under SiteName whose headers to return.

false false
Name String

The name of the HTTP header to return. Optional. If not given, all headers are returned. Wildcards supported.

false false *

Return Values

Carbon.Iis.HttpHeader.

EXAMPLE 1

Get-IisHttpHeader -SiteName SopwithCamel

Returns the HTTP headers for the SopwithCamel website.

EXAMPLE 2

Get-IisHttpHeader -SiteName SopwithCamel -Path Engine

Returns the HTTP headers for the Engine directory under the SopwithCamel website.

EXAMPLE 3

Get-IisHttpHeader -SiteName SopwithCambel -Name 'X-*'

Returns all HTTP headers which match the X-* wildcard.