Get-WebVirtualDirectory

Gets a list of the virtual directories on the specified site.

Syntax

Get-WebVirtualDirectory
   [-Site <String>]
   [-Application <String>]
   [[-Name] <String>]
   [<CommonParameters>]

Description

The Get-WebVirtualDirectory cmdlet gets a list of the virtual directories on the specified site.

Examples

Example 1: Getting a virtual directory

IIS:\> Get-WebVirtualDirectory -Site "Default Web Site" -Application "TestApp"

This command returns the list of virtual directories on the default website on which the application named TestApp is configured.

Parameters

-Application

Specifies the name of a web application associated with virtual directories to return.

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

-Name

Specifies the name of a virtual directory that this cmdlet returns.

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

-Site

Specifies the name of the site for which this cmdlet returns a list of virtual directories.

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