powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-Website



NAME
New-Website

SYNOPSIS
Creates a new IIS Web site.

SYNTAX
New-Website [-Name] [-Id ] [-Port ] [-IPAddress ] [-HostHeader ] [-Physica
lPath ] [-ApplicationPool ] [-Ssl] [-Force] [-WarningAction ] [-WarningVariable <
String>] []


DESCRIPTION
Creates a new IIS Web site.


PARAMETERS
-Name
The name of the new site to create.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Id
The ID to use for the new site.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Port
The port to use for the new site.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-IPAddress
The IP address of the new site.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-HostHeader
The host header to use for the new site.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PhysicalPath
The physical path to use for the new site. The folder specified must already exist.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-ApplicationPool
The application pool in which the new site executes.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Ssl
Including the -Ssl parameter enables HTTPS binding on the site.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Force
Forces the new site to be created.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningAction


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningVariable


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS



NOTES




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

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









RELATED LINKS