I'm trying to mount ISO file through powershell. I'm trying to do that on Windows10 virtual machine running in VMWare Fusion. Same image mounts fine when double-clicked in explorer on the same vm. I'm using Mount-DiskImage cmdlet like
Mount-DiskImage -ImagePath "[Path]" -Verbose
Error that I'm getting
Mount-DiskImage : The parameter is incorrect.
At line:1 char:1
+ Mount-DiskImage -ImagePath "C:\vs2013.4_ult_enu.iso" -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_DiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage], C
imException
+ FullyQualifiedErrorId : HRESULT 0x80070057,Mount-DiskImage
I've also tried to get more detailed error as suggested here. Result:
writeErrorStream : True
PSMessageDetails :
OriginInfo :
Exception : Microsoft.Management.Infrastructure.CimException: The parameter is incorrect.
TargetObject : MSFT_DiskImage
CategoryInfo : InvalidArgument: (MSFT_DiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage],
CimException
FullyQualifiedErrorId : HRESULT 0x80070057,Mount-DiskImage
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace :
PipelineIterationInfo : {0, 1}
Build 10074 or early build's Mount-DiskImage has buggy. Build 10122 had fix it.
My issue was that the parent folder didn't have SYSTEM with full permission. I added SYSTEM to both, the empty folder and the folder above and it worked. For debugging, just try a top level folder... If that works, work your way down.
User contributions licensed under CC BY-SA 3.0