Uninstall-PswaWebApplication

Uninstalls the Windows PowerShell® web application.

Syntax

Uninstall-PswaWebApplication
         [[-WebApplicationName] <String>]
         [-WebSiteName <String>]
         [-DeleteTestCertificate]
         [-WhatIf]
         [-Confirm]
         [<CommonParameters>]

Description

The Uninstall-PswaWebApplication cmdlet uninstalls the Windows PowerShell web application and removes the website from IIS. The cmdlet does not uninstall IIS, or any other features installed because they were required for Windows PowerShell to run.

Examples

EXAMPLE 1

PS C:\>Uninstall-PswaWebApplication

This command uninstalls the Windows PowerShell Web Application. You can use this cmdlet to uninstall the Windows PowerShell Web Application if you installed it using the default values.

EXAMPLE 2

PS C:\>Uninstall-PswaWebApplication -DeleteTestCertificate

This command uninstalls the Windows PowerShell Web Application, and deletes the test certificate associated with the application. You can use this cmdlet to uninstall the Windows PowerShell Web Application if you installed it using the default values and created a test certificate.

EXAMPLE 3

PS C:\> Uninstall-PswaWebApplication -WebApplicationName TestApplication -WebsiteName MySite -DeleteTestCertificate

This command uninstalls the Windows PowerShell Web Application when a custom website and application were specified during the install. The command removes the website named MySite and the application named TestApplication and specifies that the test certificates associated with the application are also deleted.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeleteTestCertificate

Indicates that the test certificates created by the Install_PswaWebApplication cmdlet (with the UseTestCertificate parameter) is deleted. Only the test certificate with the same name as the one created by the Install-PswaWebApplication cmdlet is removed.

Type:SwitchParameter
Position:Named
Default value:True
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WebApplicationName

Specifies the name of the web application to uninstall.

Type:String
Position:0
Default value:Pswa
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WebSiteName

Specifies the name of the web site where the web application is installed.

Type:String
Position:Named
Default value:Default Web Site
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False