New-IISSite

New-IISSite

Creates an IIS Web site.

構文

Parameter Set: Default
New-IISSite -BindingInformation <String> -Name <String> -PhysicalPath <String> [-Force] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-Passthru] [ <CommonParameters>]

詳細説明

The New-IISSite cmdlet is used to create an Internet Information Services (IIS) website with the given physical site as the root and binding information to listen on a specific IP:Port:Hostname binding.

パラメーター

-BindingInformation<String>

Specifies the binding information string to use for the new site. The binding information of the form IP:Port:hostname such as 192.168.0.1:80:www.contoso.com and one or more of the fields can be left blank, which is equivalent to using a wildcard character such as *:443:. In this representation * indicates all IP addresses and all hostnames is indicated by leaving the corresponding field blank.

Aliases

none

必須/オプション

true

位置

named

既定値

none

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

true(ByPropertyName)

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

false

-Force

ユーザーの確認を求めることなく、コマンドを強制的に実行します。

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

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

-Name<String>

Specifies the name of the IIS website.

Aliases

none

必須/オプション

true

位置

named

既定値

none

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

true(ByPropertyName)

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

false

-Passthru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットから出力は生成されません。

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-PhysicalPath<String>

Specifies the physical path to the new IIS website.

Aliases

none

必須/オプション

true

位置

named

既定値

none

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

true(ByPropertyName)

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

false

<CommonParameters>

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

入力

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

  • String

出力

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

  • Microsoft.Web.Administration.Site

使用例

Example 1: Add a new IIS web site

This command creates a new website named TestSite.

PS C:\> New-IISSite -Name "TestSite" -BindingInformation "*:8080:" –PhysicalPath "$env:systemdrive\inetpub\testsite"

Example 2: Add a new website and set application pool of the site default application to a custom name

This command creates a website named TestSite with default application assigned to the TestSiteAppPool application pool.

PS C:\> Start-IISCommitDelay
PS C:\> $TestSite = New-IISSite -Name TestSite -BindingInformation "*:8080:" –PhysicalPath "$env:systemdrive\inetpub\testsite" -Passthru
PS C:\> $TestSite.Applications[“/”].ApplicationPoolName = “TestSiteAppPool”
PS C:\> Stop-IISCommitDelay

関連項目

Get-IISSite

Remove-IISSite

Start-IISSite

Stop-IISSite

IIS Administration Cmdlets