Copy-RegistryKey
PackageDeployment Module Help |
Package Deployment Module |
Copy-RegistryKey Cmdlet |
Version 4.0.0.5 |
Copy-RegistryKey
Synopsis
Copy Registry Key
Syntax
Copy-RegistryKey [-SourceKeyPath] <String> [-TargetKeyPath] <String> [[-Context] <String>] [-ContinueOnError] [-Recurse] [-Wow64] [<CommonParameters>]
Description
Use this command to copy everything below the specified registry sub-tree to another sub-tree.
If the key you want to copy to does not exist, it will be created. 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. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-Recurse <SwitchParameter> |
||||||
If you click this check box, all subkeys will be copied as well. |
||||||
|
-SourceKeyPath <String> |
||||||
Please select the key you want to copy. |
||||||
|
-TargetKeyPath <String> |
||||||
Please select the key you want to copy to. |
||||||
|
-Wow64 <SwitchParameter> |
||||||
Use WOW64 on x64 computers. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |