Skip to content
PowerShell Commands

Import-StartLayout

Import-StartLayout [-LayoutPath*] <String> [-MountPath*] <String> [-InformationAction {SilentlyContinue | Stop |Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>] [-Confirm] [-WhatIf][<CommonParameters>]
Import-StartLayout [-LayoutLiteralPath*] <String> [-MountLiteralPath*] <String> [-InformationAction{SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>][-Confirm] [-WhatIf] [<CommonParameters>]

The Import-StartLayout cmdlet imports the specified layout of Start into a mounted Windows image. When you import a layout, it replaces the existing layout of Start. Before you use this cmdlet, mount the Windows image file to import the layout into.

You must have administrator rights to import a layout.

The Export-StartLayout cmdlet exports layouts as .xml files, and the Import-StartLayout cmdlet imports only .xml files.

Parameters

-InformationAction [<System.Management.Automation.ActionPreference>]

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:

-- SilentlyContinue-- Stop-- Continue-- Inquire-- Ignore-- Suspend

-InformationVariable [<System.String>]

Specifies a variable in which to store an information event message.

-LayoutLiteralPath <String>

  • This value is required

Specifies a literal path to a layout file. This parameter does not accept the wildcard character (*). If the path includes an escape character (\), enclose the string in single quotes (').

-LayoutPath <String>

  • This value is required

Specifies a path to a layout file.

-MountLiteralPath <String>

  • This value is required

Specifies the literal path where you mounted the .wim file. This parameter does not accept the wildcard character (*). If the path includes an escape character (\), enclose the string in single quotes (').

-MountPath <String>

  • This value is required

Specifies the path where you mounted the .wim file and specifies the local appdata folder for the default user.

-Confirm [<SwitchParameter>]

  • Default value is false

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

-WhatIf [<SwitchParameter>]

  • Default value is false

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Examples
  1. Import a layout into a Windows image:
    PS C:\>  Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage\"
    

    This command imports a layout of the Start screen into a Windows image.

  2. Validate the layout file and Windows image:
    PS C:\>  Import-StartLayout -LayoutPath "Layout.xml" -MountPath " E:\MountedImage\" -WhatIf
    

    This command validates the layout file and the Windows image by using the WhatIf parameter. Besides that parameter, the command is the same as the previous example, but this command makes no changes.

This work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.

PowerShell Commands