powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-WebVirtualDirectory



NAME
New-WebVirtualDirectory

SYNOPSIS
Creates a new IIS virtual directory.

SYNTAX
New-WebVirtualDirectory [-Site ] [-Application ] [-Name] [-PhysicalPath ] [-Force]
[-WarningAction ] [-WarningVariable ] []


DESCRIPTION
Creates a new IIS virtual directory.


PARAMETERS
-Site
The site name under which the virtual directory should be created.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Application
The application under which the virtual directory should be created.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Name
The name of the virtual directory to create.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PhysicalPath
The physical path on the file system for the new virtual directory. The folder specified must already exist.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Force
Forces the virtual directory to be created.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningAction


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningVariable


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS



NOTES




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

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


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






RELATED LINKS