Export (0) Print
Expand All
Expand Minimize

New-Website

Windows Server 2012 R2 and Windows 8.1

New-Website

Creates an IIS website.

Syntax

Parameter Set: Default
New-Website [-Name] <String> [-ApplicationPool <String> ] [-Force] [-HostHeader <String> ] [-Id <UInt32> ] [-IPAddress <String> ] [-PhysicalPath <String> ] [-Port <UInt32> ] [-Ssl] [-SslFlags <Int32> ] [ <CommonParameters>]




Detailed Description

The New-Website cmdlet creates an Internet Information Services (IIS) website with the settings specified in parameter values.

Parameters

-ApplicationPool<String>

Specifies the application pool in which the new site runs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostHeader<String>

Specifies the host header of the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-IPAddress<String>

Specifies the IP address of the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Id<UInt32>

Specifies the ID of the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the new site.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PhysicalPath<String>

Specifies the physical path of the new site. The specified folder must already exist.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Port<UInt32>

Specifies the port of the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Ssl

Indicates that this cmdlet enables HTTPS binding on the site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SslFlags<Int32>

Indicates what type of certificate and certificate storage the new website supports. The acceptable values for this parameter are:

-- 0: Regular certificate in Windows certificate storage.
-- 1: SNI certificate.
-- 2: Central certificate store.
-- 3: SNI certificate in central certificate store.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example-------------- EXAMPLEExample 1: CreateAdd a New Wweb Ssite --------------Createws

This command creates a website named TestSite.


IIS:\>New-WebSite -Name "TestSite" -Port 80 -HostHeader "TestSite" -PhysicalPath "$Env:systemdrive\inetpub\testsite"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft