-PSPropert (ies??) parameter

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of froggzy froggzy 3 years, 11 months ago.

  • Author
    Posts
  • #7997
    Profile photo of froggzy
    froggzy
    Participant

    hello,

    i am just starting with powershell with the help of learn windows powershell 3 in a month of lunches.

    i noticed on page 59 that to change a registry value using the set-itemproperties  there is a parameter called -PSPropert that give the actual name (or property ) of the reg key so we can chooose to change it's value.

    i looked into the help of PS for set-itemproperties, internet ect.. nowhere i can find this parameter.

    can anyone explain me why? and if it is hidden, is there other hidenn parameters? how can i find them?

    thank you

  • #8004

    The parameter name got truncated. It is PSProperty.  This is an alias for the -Name parameter which we should have used instead. If you use tab completion with -PS[tab] you see it.

  • #8019
    Profile photo of froggzy
    froggzy
    Participant

    an alias? mmm ok,

    so i did this:

    PS Alias:\> (get-command  Set-ItemProperty | select -ExpandProperty parameters).name.aliases

    and it returned this:
    PSProperty

    i'll remember to look for the "hidden" aliases when there is a parameter i don't get 🙂

    i also see that there is another alias for the -path: -PSpath by doing PS then tab but i cannot see it using the above command..

    is there an explanation as to why those aliases are "longer", more complicated than the original parameter?

    maybe these are generic to a lot of other cmdlet?

    sorry if this seems like dumb question and thank's a lot Jeffrey for your help.

     

     

  • #8025
    Profile photo of froggzy
    froggzy
    Participant

    forget about the PSpath question, i found out that this is the literalpath alias 🙂

You must be logged in to reply to this topic.