Export (0) Print
Expand All
Expand Minimize

New-Website

Published: February 29, 2012

Updated: August 15, 2012

Applies To: Windows Server 2012

New-Website

Creates a new IIS Web site.

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

Creates a new IIS Web site with the settings specified in parameter values.

Parameters

-ApplicationPool<String>

The application pool in which the new site executes.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Specifies that the user is not prompted for confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostHeader<String>

The host header to use for the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-IPAddress<String>

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>

The ID to use for the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

The name of the new site to create.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PhysicalPath<String>

The physical path to use for 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>

The port to use for the new site.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Ssl

Including the Ssl parameter 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/or certificate storage the new website supports. Only the following values are valid: 0 (Regular certificate in Windows certificate storage), 1 (SNI certificate), 2 (central certificate store), or 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.

Examples

-------------- EXAMPLE 1: Add a New Web Site --------------

Creates a new Web site named TestSite.


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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft