Thanks
There is no builtin support to rename keys, you'll have to create/copy the
same key tree under a new name and then delete the *old* one.
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar
T> I've been trying to Rename a registry Key on a remote system, I've
T> found info to do this locally but not remotely. Anyone know of a way
T> to do it, except for deleting and recreating?
T>
T> Thanks
T>
--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv
"Shay Levy [MVP]" <n...@addre.ss> rakstīja ziņojumā
"news:37162f677444b8...@news.microsoft.com"...
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar
Vv> It is too hard to accomplish this via PowerShell (.NET or WMI).
Vv> However we
Vv> can easily use reg.exe utility:
Vv> $source = "hklm\software\abc"
Vv> $dest = "hklm\software\abcd"
Vv> $computer = "computer"
Vv> $a = reg copy \\$computer\$source \\$computer\$dest /s
Vv> if ($a) {reg delete \\$computer\$source /f} else {write-warning
Vv> "some error
Vv> occurred"}
Vv> "Shay Levy [MVP]" <n...@addre.ss> rakst?ja zi?ojum?
Vv> "news:37162f677444b8...@news.microsoft.com"...
Vv>