powershellscripts.com

Tutorials  PowerShell Cmdlet Help for ConvertTo-WebApplication



NAME
ConvertTo-WebApplication

SYNOPSIS
Converts an IIS virtual directory to an IIS Web application.

SYNTAX
ConvertTo-WebApplication [-ApplicationPool ] [-Force] [[-PSPath] ] [-WarningAction nce>] [-WarningVariable ] [-WhatIf] [-Confirm] []


DESCRIPTION
Converts an IIS virtual directory to an IIS Web application.


PARAMETERS
-ApplicationPool
The application pool in which the application is to run.

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

-Force
Forces the conversion without prompting for user confirmation.

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

-PSPath
Specifies the configuration path. This can be either an IIS configuration path (e.g. machine/webroot/apphost) o
r the IIS module path (e.g. 'IIS:\sites\Default Web Site').

Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
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

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

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

-Confirm
Prompts you for confirmation before executing the command.

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: Convert a Virtual Directory to a Web Application --------------

C:\PS>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 using that p
hysical directory. It then converts the Virtual Directory to a Web application.






RELATED LINKS
Get-WebApplication
New-WebApplication
Remove-WebApplication