I am trying to export HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI as well as HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI regfile with PowerShell 2.0 to another drive.
I have read this StackOverflow post but I only get error message with that code. This may be because I am using v2.0. I cannot use a higher version.
Does anyone have any idea on why it doesn't work or possible how to copy both of them to another drive using PowerShell v2.0?
Code
reg copy HKCU\Software\ODBC\ODBC.INI H:\temp /s /f
Error
reg.exe : ERROR: Invalid key name.
At line:1 char:4
+ reg <<<< copy HKCU\Software\ODBC\ODBC.INI H:\temp /s /f
+ CategoryInfo : NotSpecified: (ERROR: Invalid key name.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Type "REG COPY /?" for usage.