PackageDeployment Module Help

Package Deployment Module

Mount-Registry Cmdlet

Version 2.1.0.0

Mount-Registry

Synopsis

Load Registry Hive

Syntax

Mount-Registry [-FilePath] <String> [-KeyPath] <String> [[-Context] <String>] [-ContinueOnError] [<CommonParameters>]

Description

Use this command to create a subkey in HKEY_USERS or HKEY_LOCAL_MACHINE and to load the registry information from the specified file into this subkey.
If you edit the loaded registry key the loaded file is changed as well.
In case an error occurs when running this command, you can specify the option Stop script on error in the Script Editor. If the error actually occurs, the script stops, thus preventing subsequent errors, and the associated policy is shown as not compliant.
This also applies if you set the package property Error handling to Always terminate script on error (a default setting for new packages).

Parameters

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

2

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-FilePath <String>

Enter the name of the file containing the registry information.

Required

True

Position

0

Accepts pipeline input

False

-KeyPath <String>

Enter the key you want to store the registry information in.

Required

True

Position

1

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".