Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista Tutorial - Copy-Item or Copy-ItemProperty and Remote Registry.

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


My System SpecsSystem Spec
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/
> ----------------------------------
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Copy-Item : Container cannot be copied onto existing leaf item. PowerShell
Can the copy-item cmdlet be used to copy public folders to C: ? PowerShell
copy-item changing files attributes on network copy failures PowerShell
Getting Copy-Item to display messages (like the old COPY command in CMD.EXE) ?? PowerShell
Copy|Move-ItemProperty: different meaning of -Name: why? PowerShell


Vista Forums 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 Ltd

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