Skip to content

Export-StartLayout exports as JSON, not XML as suggested #3141

Open
@dantheman213

Description

@dantheman213

Export-StartLayout says that it exports as XML but the output is actually in JSON. Subsequently, trying to import using Import-StartLayout command fails because it is not expected format.

Affected pages:

https://learn.microsoft.com/en-us/powershell/module/startlayout/export-startlayout?view=windowsserver2022-ps

https://learn.microsoft.com/en-us/powershell/module/startlayout/import-startlayout?view=windowsserver2022-ps

OS: Windows 11 Pro

Version: 21H2

OS Build: 22000.1042

Experience: Windows Feature Experience Pack 1000.22000.1042.0

CLI output:

PS C:\Users\myuser\Desktop> Export-StartLayout -Path "file.xml"
PS C:\Users\myuser\Desktop> Import-StartLayout -LayoutPath ".\file.xml" -MountPath "C:\"
Import-StartLayout : The file C:\Users\myuser\Desktop\file.xml is not a valid layout file
At line:1 char:1
+ Import-StartLayout -LayoutPath ".\file.xml" -MountPath "C:\"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-StartLayout], InvalidDataException
    + FullyQualifiedErrorId : System.IO.InvalidDataException,Microsoft.Windows.StartLayout.Commands.ImportStartLayoutComma
   nd

PS C:\Users\myuser\Desktop> cat .\file.xml
{"pinnedList":[{"packagedAppId":"Microsoft.WindowsStore_8wekyb3d8bbwe!App"}, ......

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions