Author Posts

July 1, 2013 at 4:40 am

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

July 1, 2013 at 7:05 am

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.

July 1, 2013 at 11:24 pm

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.

 

 

July 1, 2013 at 11:26 pm

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