Import-StartLayout

Welcome Forums General PowerShell Q&A Import-StartLayout

This topic contains 8 replies, has 6 voices, and was last updated by

 
Participant
1 week ago.

  • Author
    Posts
  • #124238

    Participant
    Points: 19
    Rank: Member

    I don't know if it's because of my dumb luck, or what, but I cannot get this to work.  Here's what I did:

    On Windows 10 (17134) machine, launched PowerShell ISE, and ran:

    Export-StartLayout -Path "...\Desktop\LayoutModification.xml" 

    Once that was done, I cracked it open in VS Code (as that has become default editor of all things, it appears), and added the following to the "LayoutModificationTemplate" tag:

    xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"

    Then, I left the entire Start Menu section alone, and added the Taskbar section:

    
    
    
    
    
    
    
    
    
    
    
    
    
    

    Then, with my newly saved LayoutModification.xml, I went back to PowerShell ISE, and ran the following:

    Import-StartLayout -LayoutPath "...\Desktop\LayoutModification.xml" -MountPath "C:\"

    No dice.  Says that the file is not a valid layout file.  So, I did some googling of the issue, and noticed some people finding success in changing the exported file format from xml to bin.  So, I rinsed and repeated (this time with .bin).

    No dice.  Says that the file is not a valid layout file.  So, I did some more googling of the issue, and found someone who said they were finally able to get it to work after going through all the Start Menu items, and moving the "Size='#x#' Column='#' Row='#'" to behind the "DesktopApplicationLinkPath='.....'".  So, I promptly did that.

    No dice.  Says that the file is not a valid layout file.  After even more googling, and seeing even more insane methods people have used to successfully fix this issue, I figured I might have better luck asking people who have extensive knowledge of PowerShell.  So, I googled that.  I saw a website called "powershell.org" and thought "If ever there was a place to find people who have extensive knowledge of PowerShell..."

    And so here I am – lost, frustrated, weary from my fruitless travels through the Google-sphere, and...you know, I'm not ashamed to admit...a little scared.  Scared I may never get this to work.  Scared of the feelings of inadequacy that might result.  Scared I'll go the rest of my life without ever knowing why this isn't working.  It's been a very emotional scripting journey.

  • #124353

    Participant
    Points: 866
    Helping Hand
    Rank: Major Contributor

    Of course you will see awesome PowerShell monks here and everyone will help each other.

    did you find below result in you googling ?
    https://msfn.org/board/topic/174369-windows-10-start-menu-layout-exportbackupimport/

  • #124430

    Participant
    Points: 290
    Helping Hand
    Rank: Contributor

    I'm not seeing the code or XML you're listing for the taskbar section? It's showing up blank for me.

    • #124452
      js

      Participant
      Points: 318
      Helping Hand
      Rank: Contributor

      Xml doesn't work here. He's have to share it from gist.

  • #124680

    Participant
    Points: 67
    Rank: Member

    I ran into this problem architecting our Windows 10 image. There are 2 updates that have installed that breaks the process and generates the corruption error. Remove KB4093112 and KB4099989 export your layout and then reinstall them.

    Remember you should be importing that layout in sysprep audit mode to apply to all new profiles.

    Let me know how it goes.

     

  • #128101

    Participant
    Points: 19
    Rank: Member

    Sysprep audit mode?  Now I'm definitely out of my depths.  Can audit mode be turned on/off whenever, or does it need to be done at a certain point?  Specifically, would it be something that could be done via a logon script?

    Sorry for the late reply, had a bit of an unexpected life-hiccup.

    Also, should the Import also be performed prior to the reinstallation of the 2 Windows Updates, or just the Export?

    Thanks again!

  • #128172

    Participant
    Points: 22
    Rank: Member

    I wrote something about this a while ago, https://windowsserveressentials.com/2018/03/08/customising-the-windows-10-taskbar/

    If it is saying your XML is invalid – try opening the XML in a Web Browser as it is often (for me) easier to see where the formatting has gone awry.

  • #128305

    Participant
    Points: 19
    Rank: Member

    I wrote something about this a while ago, https://windowsserveressentials.com/2018/03/08/customising-the-windows-10-taskbar/

    If it is saying your XML is invalid – try opening the XML in a Web Browser as it is often (for me) easier to see where the formatting has gone awry.

    In your article, you advise placing the .XML file in

    c:\users\default\local\appdata\microsoft\windows\shell

    – as opposed to running the

    Import-StartLayout

    command.  I don't know how I didn't come across this method before, but I like it a lot better.  Checking the date, I assume it was written/confirmed with 1703/9, have you encountered any issues with this method in 1803/9?

    Thanks! I'm going to try this ASAP

    • #128373

      Participant
      Points: 22
      Rank: Member

      Fairly sure it is still working without issue.

You must be logged in to reply to this topic.