Export (0) Print
Expand All
Expand Minimize

ConvertTo-WebApplication

ConvertTo-WebApplication

Converts an IIS virtual directory to an IIS Web application.

Syntax

ConvertTo-WebApplication [-ApplicationPool <String>] [-Force] [[-PSPath] <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description

Converts an IIS virtual directory to an IIS Web application.

Parameters

-ApplicationPool <String>

The application pool in which the application runs.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-Force <SwitchParameter>

Forces the conversion without prompting you for confirmation.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-PSPath <String[]>

Specifies the configuration path. This can be either an IIS configuration path in the format computer name/webroot/apphost, or the IIS module path in this format IIS:\sites\Default Web Site.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

2

-WarningAction <ActionPreference>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WarningVariable <String>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WhatIf <SwitchParameter>

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

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

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

Input Type

.

Return Type

.

Notes



Examples

EXAMPLE 1: Convert a Virtual Directory to a Web Application

IIS:\>md $env:systemdrive\inetpub\Contoso 
New-WebVirtualDirectory -Site "Default Web Site" -Name ContosoVDir -physicalPath $env:systemdrive\inetpub\Contoso 
ConvertTo-WebApplication "IIS:\Sites\Default Web Site\ContosoVDir"

This example creates a physical directory named "Contoso." It then creates a virtual directory in IIS that uses that physical directory. It then converts the virtual directory to a Web application.

See Also

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