-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xWebVirtualDirectory: Must specify '/' for WebApplication when virtual directory is under the website #366
Comments
Could you please provide the verbose output and your configuration? Both with the sensitive information obfuscated. |
Hello johlju, Thank you for your quick response. Note that the problematic is Vd1. Verbose output of the xWebVirtualDirectory section
This is the configuration's xWebVirtualDirectory section:
|
It must be this command that fails. What happens if yu run that command manually? What error message, or prompt, do you get? It might be that it's missing a |
Hi johlju, I think I've found the problem, which is probably related to the fact that the virtual directory is under the website and not under specific application. When I ran the command with -application "" (empty) it always prompt for an application. I'll test it soon with DSC and keep you posted. David. |
I hope it works, if it does the documentation should be updated. 🙂 |
Good news my friend 👍 it worked!
|
@Davidsod Awesome! 😃 Would you mind posing the working configuration (only the one resource that failed)? Just for reference |
@johlju sorry for the delay, there you go:
The solution is the '/' instead of '': |
@Davidsod Thank you, that should be documented. |
feels like the property shouldn't be required, and should use '/' by default if none is specified. Was very confusing to try to figure out how to add a vDir when I didn't have a WebApplication in the site, ended up finding this issue to realize I need to specify '/'. My 0.02 |
Hi, I am experiencing 'interactive mode' faults when running Remove-WebVirtualDirectory -Filter "string" -Application "string" -Name "string" -Confirm:$false The error occurs when the virtual directory contains content. When there is no content, the Remove-WebVirtualDirectory call succeeds in non-interactive mode. An internal call to "Remove-Item" prompts to "remove all items". This prompt cannot be suppressed by setting $ConfirmPreference="None", or by using -Confirm:$false. This is a critical issue for us as it prevents automated removal of LocalUser virtual directories for use with IIS Management authentication in an FTP site. |
@caractacus that is outside the scope of this DSC resource module. Please submit an support case to Microsoft so they can help you resolve your issue. A workaround would of course be to remove the content before removing the virtual directory. |
Make `Set-TargetResource` switch between `WebApplication` '' and '/' as required by `New-WebVirtualDirectory` and `Remove-WebVirtualDirectory` respectively. Fix dsccommunity#331 Fix dsccommunity#366 Similar to old (2019) pr dsccommunity#533
Make `Set-TargetResource` switch between `WebApplication` '' and '/' as required by `New-WebVirtualDirectory` and `Remove-WebVirtualDirectory` respectively. Fix dsccommunity#331 Fix dsccommunity#366 Similar to old (2019) pr dsccommunity#533
Make `Set-TargetResource` switch between `WebApplication` '' and '/' as required by `New-WebVirtualDirectory` and `Remove-WebVirtualDirectory` respectively. Fix dsccommunity#331 Fix dsccommunity#366 Similar to old (2019) pr dsccommunity#533
Make `Set-TargetResource` switch between `WebApplication` '' and '/' as required by `New-WebVirtualDirectory` and `Remove-WebVirtualDirectory` respectively. Fix dsccommunity#366
Make `Set-TargetResource` switch between `WebApplication` '' and '/' as required by `New-WebVirtualDirectory` and `Remove-WebVirtualDirectory` respectively. Fix dsccommunity#366
) - WebVirtualDirectory [Issue dsccommunity#366](dsccommunity#366) In WebVirtualDirectory WebApplication '' and '/' can now be used interchangeably. - Fixed Add WebVirtualDirectory when WebApplication = '/'. - Fixed Remove WebVirtualDirectory when WebApplication = ''.
Hello,
When running the resource with 'Absent' flag, I'm getting the following error:
##[error]PowerShell Desired State Configuration does not support execution of commands in an interactive mode. Please ensure that the underlying command is not prompting for user input, such as missing mandatory parameter, confirmation prompt etc. + CategoryInfo : NotSpecified: (:) [], CimException + FullyQualifiedErrorId : System.NotSupportedException,Microsoft.IIs.PowerShell.Provider.RemoveVirtualDirectoryCom mand + PSComputerName : IPAddress
'Ensure' works perfectly but when I run it with 'Absent' it brings up the above error.
Appreciate your assistance,
David
The text was updated successfully, but these errors were encountered: