New-Website

New-Website

Creates an IIS website.

Sintaxis

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

Descripción detallada

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

Parámetros

-ApplicationPool<String>

Specifies the application pool in which the new site runs.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Force

Fuerza que el comando se ejecute sin pedir confirmación al usuario.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-HostHeader<String>

Specifies the host header of the new site.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-IPAddress<String>

Specifies the IP address of the new site.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Id<UInt32>

Specifies the ID of the new site.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies the name of the new site.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PhysicalPath<String>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Port<UInt32>

Specifies the port of the new site.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Ssl

Indicates that this cmdlet enables HTTPS binding on the site.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-SslFlags<Int32>

Indicates what type of certificate and certificate storage the new website supports. Los valores aceptables para este parámetro son los siguientes:

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

true (ByPropertyName)

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

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"

Temas relacionados

Get-Website

Remove-Website

Start-Website

Stop-Website