New-WebSitesApplication

New-WebSitesApplication

Creates a web application.

Syntax

Parameter Set: Default
New-WebSitesApplication [-SiteName] <String> [-ApplicationName] <String> [-ConnectionString <String> ] [-PhysicalPath <String> ] [-PipelineVariable <String> ] [-StorageVolumeName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The New-WebSitesApplication cmdlet creates a web application.

A web site contains one or more Internet Information Services (IIS) 7 applications, each of which can have their own independent web configurations.

Parameters

-ApplicationName<String>

Specifies the name of an application.

 

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-ConnectionString<String>

Specifies a connecting string to a hosting database. If this parameter is not specified, the default instance of the hosting database is used.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-PhysicalPath<String>

Specifies the physical path to the application in the content folder for the web site.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-PipelineVariable<String>

Specifies a variable to be used with the pipeline operator.

 

Aliases

pv

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-SiteName<String>

Specifies the name of a site.

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-StorageVolumeName<String>

Specifies the name of the storage volume.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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: Create an application

This command creates a web application named Application01 that is a child of the site named Site01.

PS C:\> New-WebSitesApplication -SiteName "Site01" -ApplicationName "Application01"

 

Related topics

Get-WebSitesApplication

Remove-WebSitesApplication