PackageDeployment Module Help

Package Deployment Module

Save-Registry Cmdlet

Version 4.0.0.5

Save-Registry

Synopsis

Save Registry Key to File

Syntax

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

Description

Use this command to save all registry keys including all subkeys and values in a file.
If an error occurs while running the command, the script stops. If you want to continue the script if there is an error, enable the setting Continue script despite error in the Script Editor.

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 you want to save the registry information to.
If you want to save the file in a FAT file system using the RegLoadKey command, the file cannot have a file extension.

Required

True

Position

1

Accepts pipeline input

False

-KeyPath <String>

Enter the key you want to save. You may also use one of the following predefined values: HKEY_CLASSES_ROOT, (HKEY_CURRENT_USER), HKEY_LOCAL_MACHINE, HKEY_USERS.

Required

True

Position

0

Accepts pipeline input

False

-Wow64 <SwitchParameter>

Use WOW64 on x64 computers.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

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