Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remote Registry Rename

146 views
Skip to first unread message

Trev

unread,
Mar 17, 2009, 12:41:37 PM3/17/09
to
I've been trying to Rename a registry Key on a remote system, I've
found info to do this locally but not remotely. Anyone know of a way
to do it, except for deleting and recreating?

Thanks

Shay Levy [MVP]

unread,
Mar 22, 2009, 8:03:51 AM3/22/09
to
Hello Trev,

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>


Vadims Podans

unread,
Mar 22, 2009, 10:06:52 AM3/22/09
to
It is too hard to accomplish this via PowerShell (.NET or WMI). However we
can easily use reg.exe utility:
$source = "hklm\software\abc"
$dest = "hklm\software\abcd"
$computer = "computer"
$a = reg copy \\$computer\$source \\$computer\$dest /s
if ($a) {reg delete \\$computer\$source /f} else {write-warning "some error
occurred"}

--
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 [MVP]

unread,
Mar 22, 2009, 3:16:14 PM3/22/09
to
Excellent.


---
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>

0 new messages