Hello
I am try to copy all values from ‘HKLM:\SOFTWARE\Source\App’ and copy into the HKCU for all users at ‘HKCU:\Software\Target\App’ using Invoke-HKCURegistrySettingsForAllUsers, the values for the source location are unique to each device, does anyone know how i can capture that information and then copy it to the target location? i’ve had little success with Get/Set-Registry Key so far via
$registryValues = Get-RegistryKey -Key $sourceKeyPath
and
Invoke-HKCURegistrySettingsForAllUsers {
foreach ($value in $registryValues) {
Set-RegistryKey -Key $targetKeyPath -Name $value.Name -Value $value.Data -SID $UserProfile.SID -ContinueOnError $false
}
}
Many thanks