Remove-WebVirtualDirectory

Removes an IIS virtual directory.

Syntax

Remove-WebVirtualDirectory
      [-Site <String>]
      [-Application <String>]
      [-Name] <String>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Removes an IIS virtual directory.

Examples

-------------- EXAMPLE 1: Removing a virtual directory --------------

IIS:\>Remove-WebVirtualDirectory -Site "Default Web Site" -Application "testApp" -Name testVirtualDir

Removes the virtual directory named testVirtualDir from the Default Web Site.

Required Parameters

-Name

The name of the virtual directory to remove.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Application

The name of the application that hosts the virtual directory.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

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

The name of the site that hosts the virtual directory to remove.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False