Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Copy-Item or Copy-ItemProperty and Remote Registry.

Closed Thread
 
Thread Tools Display Modes
Old 01-09-2007   #1 (permalink)
Brandon Shell
Guest


 

Copy-Item or Copy-ItemProperty and Remote Registry.

There are a couple of questions on this one.

1) Can I use new-psdrive to mount a remote registry?

2) Can I use copy-item or Copy-ItemProperty on Registry keys?

3) Can I use copy-item or Copy-ItemProperty on anything or does it have to
be a PSDrive?

Brandon Shell
---------------
Stop by my blog some time
http://mybsinfo.blogspot.com/
----------------------------------

Old 01-09-2007   #2 (permalink)
Gaurhoth
Guest


 

Re: Copy-Item or Copy-ItemProperty and Remote Registry.

I don't believe powershell's new-psdrive supports remote registry access. Best bet is probably dotnet... example below...

PS ps:\> $computer = "COMPUTER1"
PS ps:\> $rk = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,$computer)
PS ps:\> $rr = $rk.opensubkey("\Software\Microsoft\Internet Explorer")
PS ps:\> $rr.GetValue("Version")
7.0.6000.16386
PS ps:\>

Obviously I'm not trapping for any errors in this example (which you will get if the remote computer cannot be contacted, permission is denied, etc).

As for 2 and 3, haven't tried either.

--

gaurhoth
http://gaurhothw.spaces.live.com/


"Brandon Shell" <tshell.mask@gmail.com> wrote in message news:uPhN7IANHHA.320@TK2MSFTNGP06.phx.gbl...
> There are a couple of questions on this one.
>
> 1) Can I use new-psdrive to mount a remote registry?
>
> 2) Can I use copy-item or Copy-ItemProperty on Registry keys?
>
> 3) Can I use copy-item or Copy-ItemProperty on anything or does it have to
> be a PSDrive?
>
> Brandon Shell
> ---------------
> Stop by my blog some time
> http://mybsinfo.blogspot.com/
> ----------------------------------
>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can the copy-item cmdlet be used to copy public folders to C: ? JoshGfromPortland PowerShell 8 06-09-2008 09:03 PM
copy-item changing files attributes on network copy failures jas PowerShell 4 01-31-2008 12:39 PM
Getting Copy-Item to display messages (like the old COPY command in CMD.EXE) ?? Marc Scheuner PowerShell 15 10-26-2007 02:41 AM
Copy-Item JW PowerShell 4 05-03-2007 04:19 PM
Copy|Move-ItemProperty: different meaning of -Name: why? Roman Kuzmin PowerShell 2 04-27-2007 03:07 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50