Export (0) Print
Expand All
Expand Minimize

New-WebVirtualDirectory

Published: February 29, 2012

Updated: August 15, 2012

Applies To: Windows Server 2012

New-WebVirtualDirectory

Creates a new virtual directory in IIS.

Syntax

Parameter Set: Default
New-WebVirtualDirectory [-Name] <String> [-Application <String> ] [-Force] [-PhysicalPath <String> ] [-Site <String> ] [ <CommonParameters>]




Detailed Description

Creates a new virtual directory in IIS.

Parameters

-Application<String>

The application under which the virtual directory is created.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Specifies that the user is not prompted for confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

The name of the virtual directory to create.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PhysicalPath<String>

The physical path to the folder in which the new virtual directory is created. The specified folder must already exist.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Site<String>

The site name under which the virtual directory is created.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Examples

-------------- EXAMPLE 1: Creating a Virtual Directory --------------

The example creates a new virtual directory named "ContosoVDir" on the Default Web Site.


IIS:\>New-WebVirtualDirectory -Site "Default Web Site" -Name ContosoVDir -PhysicalPath c:\inetpub\contoso

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft