Get-IisWebsite

Returns all the websites installed on the local computer, or a specific website.

Syntax

Get-IisWebsite [[-Name] <String>] [<CommonParameters>]

Description

Returns a Microsoft.Web.Administration.Site object.

Each object will have a CommitChanges script method added which will allow you to commit/persist any changes to the website's configuration.

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
Name String

The name of the site to get.

false false

Return Values

Microsoft.Web.Administration.Site.

EXAMPLE 1

Get-IisWebsite

Returns all installed websites.

EXAMPLE 2

Get-IisWebsite -SiteName 'WebsiteName'

Returns the details for the site named WebsiteName.