Export (0) Print
Expand All
Expand Minimize

Remove-WebApplication

Windows Server 2012 R2 and Windows 8.1

Remove-WebApplication

Removes a web application from an IIS website.

Syntax

Parameter Set: Default
Remove-WebApplication [-Name] <String> [-Site <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-WebApplication cmdlet removes a web application from an Internet Information Services (IIS) website.

Parameters

-Name<String>

Specifies the name of the application to remove from the site.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Site<String>

Specifies the name of the site from which this cmdlet removes the application.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

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 (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example -------------- EXAMPLE Example 1: Adding a Web web application and then removinge it --------------web then e

This first command creates a web application named TestApp on the default website. The second command removes the application after 5 seconds.


IIS:\>New-WebApplication -Name "TestApp" -Site "Default Web Site" -PhysicalPath "$Env:systemdrive\inetpub\TestApp" "Sleep for 5 seconds before Web App is removed"; Sleep 5 
IIS:\> Remove-WebApplication -Name "TestApp" -Site "Default Web Site"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft