Uninstall-PswaWebApplication
Uninstall-PswaWebApplication
Uninstalls the web application.
Syntax
Parameter Set: Default
Uninstall-PswaWebApplication [[-WebApplicationName] <String> ] [-DeleteTestCertificate] [-WebSiteName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
true |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WebApplicationName<String>
Specifies the name of the web application to uninstall.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
pswa |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WebSiteName<String>
Specifies the name of the web site where the web application is installed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
Default Web Site |
Accept Pipeline Input? |
false |
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 (https://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 1: Uninstall the web application
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.
PS C:\> Uninstall-PswaWebApplication
EXAMPLE 2: Uninstall the web application and delete the test certificate
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.
PS C:\> Uninstall-PswaWebApplication -DeleteTestCertificate
EXAMPLE 3: Uninstall the web application with a custom website name
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 ContosoSite and the application named ContosoApplication and specifies that the test certificates associated with the application are also deleted.
PS C:\> Uninstall-PswaWebApplication -WebApplicationName "ContosoApplication" -WebsiteName "ContosoSite" -DeleteTestCertificate