Skip to content

xWebVirtualDirectory Fails to create a virtual directory if it already exists #331

Open
@PraveenKalavai

Description

@PraveenKalavai

xWebVirtualDirectory Services
{
Name = "Services"
Website = $Node.WebsiteName
WebApplication = $WebApplication
PhysicalPath = "F:\docs\tfs"
Ensure = "Present"
DependsOn = '[xWebsite]NewWebSite'
}

Desired Behavior : The resource should detect the virtual directory exists, and skip it.

*Actual Behavior: It attempts to create the virtual directory, and throws an error saying to use the 'force' parameter.

Error :
VERBOSE:[SERVERNAME]: [[xWebVirtualDirectory]Services] Creating new Web Virtual Directory "Services".
Destination element already exists, please use "force" parameter to override.
+ CategoryInfo : InvalidArgument: (:) [], CimException
+ FullyQualifiedErrorId : Destination element already exists, please use "force" parameter to override.,Microsoft.IIs.PowerShell.Provider.NewVirtualDirectoryCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug.in progressThe issue is being actively worked on by someone.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions