Get-IisHttpRedirect

Gets the HTTP redirect settings for a website or virtual directory/application under a website.

Syntax

Get-IisHttpRedirect [-SiteName] <String> [[-VirtualPath] <String>] [<CommonParameters>]

Description

Returns a Carbon.Iis.HttpRedirectConfigurationSection object for the given HTTP redirect settings. The object contains the following 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 site's whose HTTP redirect settings will be retrieved.

true false
VirtualPath String

The optional path to a sub-directory under SiteName whose settings to return.

false false

Return Values

Carbon.Iis.HttpRedirectConfigurationSection.

EXAMPLE 1

Get-IisHttpRedirect -SiteName ExampleWebsite

Gets the redirect settings for ExampleWebsite.

EXAMPLE 2

Get-IisHttpRedirect -SiteName ExampleWebsite -Path MyVirtualDirectory

Gets the redirect settings for the MyVirtualDirectory virtual directory under ExampleWebsite.