Windows 10: PowerShell Import-StartLayout

Discus and support PowerShell Import-StartLayout in Windows 10 Customization to solve the problem; I'm using Import-StartLayout to automatically pin certain apps to the taskbar for new users on my machine. It works as in the apps are pinned, but if I... Discussion in 'Windows 10 Customization' started by iIVIute, Aug 9, 2021.

  1. iIVIute Win User

    PowerShell Import-StartLayout


    I'm using Import-StartLayout to automatically pin certain apps to the taskbar for new users on my machine. It works as in the apps are pinned, but if I pin a new app to the taskbar, they move upon logging off and back in. I was wondering if there was a way to stop this from happening? Here is a link to the XML file I'm using. https://github.com/iIVIute/Automation/blob/main/start.xmlI know there's a better option through Group Policy editing, but I'm trying to achieve this with code. Thanks!

    :)
     
    iIVIute, Aug 9, 2021
    #1
  2. TMH
    TMH Win User

    Import-StartLayout doesn't change anything

    I'm trying to create a layout template on Windows 10 using the Export/Import-StartLayout commands.

    Here's what I've done.

    1. Open an admin PowerShell window.
    2. Run Export-StartLayout -Path layout.xml.
    3. Unpin some tiles from my start menu
    4. Run Import-StartLayout -LayoutPath layout.xml -MountPath C:\

    When I look at my start menu now, the tiles I remove haven't come back. The Import command gives me no errors.

    Am I using the commands wrong? Is there something else I need to do before/afterwards?

    Here's the contents of layout.xml

     
  3. Export-Startlayout possible bug 1607

    Hi

    Windows 10 x64 Education 1607

    If I have a redirected start menu via folder redirection. This is with loopback replace set. Then I place some Apps E.G

    Word,Excel, Powerpoint and some URL links on the start layout.

    Then I start Powershell as as administrator and run Export-Startlayout -path c:\start.xml

    I get this error

    Export-StartLayout : Error HRESULT E_FAIL has been returned from a call to a COM component.

    At line:1 char:1

    + Export-StartLayout -Path C:\start.xml

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : NotSpecified: PowerShell Import-StartLayout :)) [Export-StartLayout], COMException

    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Start

    Layout.Commands.ExportStartLayoutCommand

    Can someone else please try this.

    I've ruled out Anti Virus. It works with a local start menu.
     
    MattWilkinson_, Aug 9, 2021
    #3
  4. Bob.Taves Win User

    PowerShell Import-StartLayout

    Using "Import-StartLayout" to customize the Start Menu for Windows 10 Pro build 1709 (XML)

    I've been trying all day to find the arcane formula that is needed to make this actually work but have not had any success. I'm trying to customize the new user Start Menu using the "Import-StartLayout" PowerShell tool. I need to include pinned items for
    "Documents", "Pictures", "Music" and "Devices and Printers" (all of these are .lnk files).

    I started by building the Start Menu I needed then used "Export-StartLayout" to generate the XML. The exported XML looks fine and I get no errors at all when importing it. Logging in with a new user will show some of the items from the custom Start Menu
    but none of the links I mentioned above. The spaces where those links should appear are just blank. I've even simplified the XML to only include the links above and that causes the new user to see no pinned tiles at all; only the primary Start Menu. Here is
    the simplified XML that results in no pinned items:

    <LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">

    <LayoutOptions StartTileGroupCellWidth="6" />

    <DefaultLayoutOverride>

    <StartLayoutCollection>

    <defaultlayout:StartLayout GroupCellWidth="6">

    <start:Group Name="">

    <startPowerShell Import-StartLayout :DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Documents.lnk" />

    <startPowerShell Import-StartLayout :DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Music.lnk" />

    <startPowerShell Import-StartLayout :DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Pictures.lnk" />

    </start:Group>

    </defaultlayout:StartLayout>

    </StartLayoutCollection>

    </DefaultLayoutOverride>

    </LayoutModificationTemplate>

    In this example I've copied the .lnk files into "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs" but I've also tried them in a dozen other locations all with the same result. The paths are valid for the new user because after login I can copy/paste
    them into "Run" and it will open the correct folder (Pictures, Music, etc).

    Has anyone successfully added these links to a customized Start Menu with build 1709 using XML applied with "Import-StartLayout"? If so, could you answer the following (please be exact/precise):

    • What does your XML look like?
    • Where did you place the .lnk files?
    • Did you create the .lnk files for Pictures, Music, etc or copy them from another starting location?
     
    Bob.Taves, Aug 9, 2021
    #4
Thema:

PowerShell Import-StartLayout

Loading...
  1. PowerShell Import-StartLayout - Similar Threads - PowerShell Import StartLayout

  2. WDAC powershell policy using import-climl for policy rules error

    in Windows 10 Gaming
    WDAC powershell policy using import-climl for policy rules error: I've used the Microsoft documentation example code to create a powershell script that takes a Microsoft Base WDAC policy and adds filepaths rules and policy options. This is great as I can store the small powershell script in source control and easily make changes & reproduce...
  3. WDAC powershell policy using import-climl for policy rules error

    in Windows 10 Software and Apps
    WDAC powershell policy using import-climl for policy rules error: I've used the Microsoft documentation example code to create a powershell script that takes a Microsoft Base WDAC policy and adds filepaths rules and policy options. This is great as I can store the small powershell script in source control and easily make changes & reproduce...
  4. WDAC powershell policy using import-climl for policy rules error

    in AntiVirus, Firewalls and System Security
    WDAC powershell policy using import-climl for policy rules error: I've used the Microsoft documentation example code to create a powershell script that takes a Microsoft Base WDAC policy and adds filepaths rules and policy options. This is great as I can store the small powershell script in source control and easily make changes & reproduce...
  5. Microsoft Office apps not pinning to taskbar from startlayout xml file

    in Windows 10 Software and Apps
    Microsoft Office apps not pinning to taskbar from startlayout xml file: Hi, I've been trying to set up a startlayout xml file to set my taskbar the way I want it to be set. I've created the xml file following this link: https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbarIt partially works, I'm able to pin Chrome,...
  6. is PowerShell ISE important ?

    in Windows 10 Installation and Upgrade
    is PowerShell ISE important ?: Hi community ,hope everyone is doing well . i have a question which is "is PowerShell ISE important or can i uninstall it ?" . Regards,Manas https://answers.microsoft.com/en-us/windows/forum/all/is-powershell-ise-important/5f60df63-2fe3-4dfa-9b4b-6c5ca77cf77b
  7. StartLayout XML file missing last section

    in Windows 10 Customization
    StartLayout XML file missing last section: Run as PowerShell Administrator: PS C:\Windows\system32> Export-StartLayout -Path "D:\Custom_StartLayout.xml" When I open the xml file the last group "More Readers" is completely missing. All else looks okay. [ATTACH] Here is the beginning code, first group, last group...
  8. How to Backup and Import Device Drivers in Windows 10 Using PowerShell

    in Windows 10 Backup and Restore
    How to Backup and Import Device Drivers in Windows 10 Using PowerShell: How to Backup and Import Device Drivers in Windows 10 Using PowerShell Device drivers are very much essential to ensure a smooth functioning of any OS. To backup these installed drivers on the machine you need to run a specific command into the Powershell. First, you'll...
  9. urgent - Windows 10 - Startlayout without ICON

    in Windows 10 Customization
    urgent - Windows 10 - Startlayout without ICON: Hello everyone*Smile, this its the case When i want to customize the startlayout WITHOUT icon this not work. I unping all icon from the start layout and i export with powershell the startlayout.xml This is the result: <LayoutModificationTemplate Version="1"...
  10. Export-Startlayout cmdlet lacks [-As BIN|XML] parameter on my system

    in Windows 10 Performance & Maintenance
    Export-Startlayout cmdlet lacks [-As BIN|XML] parameter on my system: Hi! I'm trying to export start menu to bin file but Export-StartLayout -Path "C:\Marketing.bin" -As BIN says: Code: Export-StartLayout : A parameter cannot be found that matches parameter name 'As'.AT line:1 char:45 + Export-StartLayout -Path "C:\Marketing.BIN" -As BIN +...