Skip to content
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

MSFT_MountImage - Dismounting an image fails Window Server 2019 #221

Closed
wsmelton opened this issue Dec 22, 2019 · 0 comments · Fixed by #249
Closed

MSFT_MountImage - Dismounting an image fails Window Server 2019 #221

wsmelton opened this issue Dec 22, 2019 · 0 comments · Fixed by #249
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.

Comments

@wsmelton
Copy link

wsmelton commented Dec 22, 2019

https://github.com/dsccommunity/StorageDsc/blob/dev/Examples/Resources/MountImage/1-MountImage_DismountISO.ps1

Use the above example does not seem to work for me on Windows Server 2019 with an ISO mounted to drive Z:

configuration MountImage_DismountISO
{
    Import-DscResource -ModuleName StorageDsc

    MountImage ISO
    {
        ImagePath = 'c:\software\SQLServer2019-x64-ENU-Dev.iso'
        DriveLetter = 'Z'
        Ensure = 'Absent'
    }
}

The error returned:

PowerShell DSC resource MSFT_MountImage  failed to execute Test-TargetResource functionality with error message:
System.InvalidOperationException: Ensure is 'Absent' but 'DriveLetter' was specified.
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost
wsmelton added a commit to wsmelton/StorageDsc that referenced this issue Dec 22, 2019
The drive letter should not be provided when wanting to ensure an ISO is no longer mounted.
@PlagueHO PlagueHO added in progress The issue is being actively worked on by someone. bug The issue is a bug. labels Dec 24, 2019
PlagueHO added a commit that referenced this issue Dec 30, 2020
Correct Example MountImage Dismount - Fixes #221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.
Projects
None yet
2 participants