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 - Copy|Move-ItemProperty: different meaning of -Name: why?

Reply
 
Old 04-22-2007   #1 (permalink)
Roman Kuzmin


 
 

Copy|Move-ItemProperty: different meaning of -Name: why?

From help:
Copy-ItemProperty -name <string>
Move-ItemProperty -name <string[]>

It seems to me Copy and Move parameters should be as much similar as
possible. Variant with <string[]> looks more practically useful.

Any remarks?

--
Thanks,
Roman Kuzmin



My System SpecsSystem Spec
Old 04-26-2007   #2 (permalink)
Don Jones [MVP]


 
 

Re: Copy|Move-ItemProperty: different meaning of -Name: why?

Possible it's a typo in the help file? Both parms accept pipeline input,
which sort of implies an array/collection. Wouldn't be the first help file
typo, in any event.

--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

"Roman Kuzmin" <z@z.z> wrote in message
news:ei7e6cRhHHA.392@TK2MSFTNGP06.phx.gbl...
> From help:
> Copy-ItemProperty -name <string>
> Move-ItemProperty -name <string[]>
>
> It seems to me Copy and Move parameters should be as much similar as
> possible. Variant with <string[]> looks more practically useful.
>
> Any remarks?
>
> --
> Thanks,
> Roman Kuzmin
>
>


My System SpecsSystem Spec
Old 04-27-2007   #3 (permalink)
Roman Kuzmin


 
 

Re: Copy|Move-ItemProperty: different meaning of -Name: why?

No, unfortunately it is not a typo in the help file:

Example a1: is a PSDrive in the Registry:

Copy-ItemProperty fails:

> Copy-ItemProperty . -Name Command0,HotKey -Dest a1:\Item1

Copy-ItemProperty : Cannot convert 'System.Object[]' to the type
'System.String' required by parameter 'Name'. Specified method is not
supported.
At line:1 char:26
+ Copy-ItemProperty . -Name <<<< Command0,HotKey -Dest a1:\Item1

But Move-ItemProperty with the same parameters succeeds:

> Move-ItemProperty . -Name Command0,HotKey -Dest a1:\Item1


--
Thanks,
Roman Kuzmin

"Don Jones [MVP]" <don@sapien.com> wrote in message
news:C3556BCB-27C3-40E1-A6AA-0802C2E9C880@microsoft.com...
> Possible it's a typo in the help file? Both parms accept pipeline input,
> which sort of implies an array/collection. Wouldn't be the first help file
> typo, in any event.
>
> --
> Don Jones
> Windows PowerShell MVP
> Founder: www.ScriptingAnswers.com
> Co-Author: "Windows PowerShell: TFM"



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Copy/Move files. Vista General
copy or move General Discussion
Re: Copy and Move Paralysis Vista performance & maintenance
COPY/MOVE Vista General
Copy-Item or Copy-ItemProperty and Remote Registry. 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