none
"import-startlayout" powershell command not working any more in windows 10 Enterprise build 1607 (OS Build14393.693)

    Question

  • if the command export-startlayout is executed after all the pinned applications are removed from the start menu to produce an xml sicnce the bin format is not available any more an error is thrown when this startlayout xml file is imported.

    Import-StartLayout : The file C:\temp\startlayout.xml is not a valid layout file
    At line:1 char:2
    +  Import-StartLayout -LayoutPath "c:\temp\startlayout.xml" -MountPath  ...
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-StartLayout], InvalidDataException
        + FullyQualifiedErrorId : System.IO.InvalidDataException,Microsoft.Windows.StartLayout.Commands.ImportStartLayoutC
       ommand

    contents of the unmodified exported file through the "Export-StartLayout -path c:\temp\startlayout.xml" command:

    <LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
      <LayoutOptions StartTileGroupCellWidth="6" />
      <DefaultLayoutOverride>
        <StartLayoutCollection>
          <defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" />
        </StartLayoutCollection>
      </DefaultLayoutOverride>
    </LayoutModificationTemplate>

    Please solve this isssue ASAP...

    If I would not needed edge I would have deployed the LTSB version where the start layout is empty by default

    Thursday, March 9, 2017 7:28 AM

All replies

  • Hi,

    Please give us your PowerShell screenshot for analysis.

    Open the PowerShell with Admin account, then type cd\ to back to C:\ root directory as below.

    After that, copy the following cmdlet:

    Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage\"

    Note: Replace your real XML file and mount path.

    Here is the official document for reference:

    Import-StartLayout

    https://technet.microsoft.com/en-us/itpro/powershell/windows/start-layout/import-startlayout


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, March 10, 2017 7:10 AM
    Moderator
  • I'm sorry I have to post it this way as I'm not allowed to upload images nor links in this forum as long as my account couldn't be verified: (replace the xx by tt).

    You will find both the screenshot of the powershell command as the contents of the xml generated by the export command

    hxxps://drive.google.com/drive/folders/0B5HpbyyBfc7lZndSZmZQQXpQMDg?usp=sharing

    Please understand that the right part in my start menu is empty at the time the start layout is exported. (so NO pinned apps whatsoever as in the ltsb version)

    Friday, March 10, 2017 1:10 PM
  • Hi,

    Could you share the image to OneDrive Since I cannot access Google drive?

    In addition, have you check the official guide?

    Import-StartLayout

    https://technet.microsoft.com/en-us/itpro/powershell/windows/start-layout/import-startlayout


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, March 13, 2017 9:06 AM
    Moderator
  • Here you are:

    https://1drv.ms/f/s!AvRW9Te6CFylgm_GiipmQop9n9Ae

    Yes I did check the guide and it does not work for an empty start layout

    Wednesday, March 15, 2017 7:59 AM
  • Hi,

    Copy this XML content to your startlayout file and then try again.

    <LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
      <LayoutOptions StartTileGroupCellWidth="6" />
      <DefaultLayoutOverride>
        <StartLayoutCollection>
          <defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
          </defaultlayout:StartLayout>
        </StartLayoutCollection>
      </DefaultLayoutOverride>
    </LayoutModificationTemplate>


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 15, 2017 9:59 AM
    Moderator
  • Any update?

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, March 17, 2017 9:34 AM
    Moderator
  • This iss exactly the same as what I posted and it does not work. I found a workaround by copying C:\Users\<a user with an empty start layout>\AppData\Local\TileDataLayer\Database to C:\Users\default\AppData\Local\TileDataLayer\Database

    and C:\Users\<a user with an empty start layout>\AppData\Local\Microsoft\Windows\Shell\defaultlayouts.xml and C:\Users\<a user with an empty start layout>\AppData\Local\Microsoft\Windows\Shell\layoutmodification.xml

    to:

    and C:\Users\default\AppData\Local\Microsoft\Windows\Shell\defaultlayouts.xml and C:\Users\default\AppData\Local\Microsoft\Windows\Shell\layoutmodification.xml

    This can only be done for a user that has been logged off.

    If a new user then logs in he/she will get an empty start layout by default.

    Please fix the export/import functionality so it works as mentioned in the how-to's even with an empty start layout or build in a checking mrechanism to state a users  start menu is empty and you will not export/import an empty start layout.


    Monday, March 20, 2017 2:26 PM
  • this one got me to play around with the tiledatalayer folder:

    https://www.reddit.com/r/PowerShell/comments/4bnjyx/importstartlayout_invalid_file/

    as the above is a workaround i will not mark it as the answer.


    • Edited by rcoolen Monday, March 20, 2017 2:46 PM
    Monday, March 20, 2017 2:44 PM
  • Hi rcoolen,

    Based on my test, yes, it's not working if your startlayout file is blank.

    So far, the only way is that workaround you found.

    Meanwhile, please submit this feedback via the built-in Feedback App.

    I would also submit it via our own channel. Hope it would be fix soon.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wednesday, March 22, 2017 9:25 AM
    Moderator