Description
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