Windows Vista Forums

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

  1. #1


    Roman Kuzmin Guest

    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

  2. #2


    Don Jones [MVP] Guest

    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

  3. #3


    Roman Kuzmin Guest

    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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Move files. PVR Vista General 5 17 Aug 2009
copy or move kiddieboy12 General Discussion 4 11 Feb 2009
COPY/MOVE Paul Koukos Vista General 3 11 May 2008
Where are Move To... & Copy To... shortcuts? CadWizard Vista file management 8 13 Sep 2007
Copy-Item or Copy-ItemProperty and Remote Registry. Brandon Shell PowerShell 1 09 Jan 2007