Powershell – Access Denied error when trying to mount an install.wim file using Mount-WindowsImage cmdlet

powershellwdswindows-server-2012-r2

When ever I try to mount a windows image to apply updates so that I can do mass deployment using WDS, I get an access denied error. Here is an example of the command I ran, and the error issued to me by the Windows Server 2012 R2 Datacenter OS.

Mount-WindowsImage -ImagePath "F:\sources\install.wim" -Path "D:\MountPoint" -Index 2

Mount-WindowsImage : You do not have permissions to mount and modify this image.
Verify that you have Read/Write permissions or mount the image using the /ReadOnly option. Note that you cannot commit changes to an 
image with read-only permissions.

The image I am trying to mount is a Windows 8.1 Pro image. The WDS server is a Virtual Machine running on top of Hyper-V in a Server 2012 R2 Datacenter host. I am logged in with full admin rights.

Do anyone know how to address this access denied error?

Best Answer

Are you mounting the install.wim directly from the disk/iso? If so, try to copy it out of the disk/iso first (e.g. to D:\wim\install.wim) and try again.