Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to create an Advanced Function in with "Named Property" which is a property that is not displayed in the default output. I have been trying to find the syntax with no luck. CMDlets have these. You have to use Get-Member to discover them.

Thanks for your help

share|improve this question
2  
can you maybe give an example of what you are talking about? I almost wonder if you are talking about input parameters to the function? –  MattB Dec 15 '10 at 14:21

3 Answers 3

Do you mean "NoteProperty"?

Add-Member allows you to add members dynamically to your objects. Check out help add-member.

share|improve this answer

If you want to configure how formatting is displayed, you would need to create a format.ps1xml file and load that formatting file after you create your function. Probably the best way to do this would be in a module and include the formatting file the module manifest (psd1) file.

To get more information, check out help about_format.ps1xml and help Update-FormatData

share|improve this answer

It doesn't display by default because it is not specified in the formatting file of the object's type (ps1xml). You can still see it if you pipe to format-* and specify all properties ('*').

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.