Please feel free to provide feedback or file bugs here.

Bug in Import-StartLayout cmdlet

The documentation states to import a .xml to a mounted Windows image, you can use the powershell command:
PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"

This will generate an error. You cannot end -MountPath with a '' character, if you do, PowerShell throws the error:
Import-StartLayout : The path B:\WIMs\Test\ did not resolve to a file.

If you format the command:
PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"
You will receive the following error:
Import-StartLayout : Could not find a part of the path
'E:\MountedImageUsers\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml'.
Note the missing '\' character between "MountedImage" and "Users"
This appears to be an error in the Import-StartLayout commandlet.

For a workaround, I used Junction64.exe to create the expected 'E:\MountedImageUsers' junction targeted to 'E:\MountedImage\Users'

At this point, the command completed successfully. I removed the dummy junction, and was able to commit the changes and Un-Mount the wim file.
PS C:\ DISM.exe /Unmount-Wim /MountDir:'E:\MountedImage' /commit

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Kyle shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base