![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Why exclude PropertieSet from Properties? [System.Management.Automation.PSmemberTypes]: roperties -band[System.Management.Automation.PSmemberTypes]: ropertysetThe above expression returns false which means that Get-Process | Get-Member -MemberType Properties will not return the PropertySet property associated with System.Diagnositic.Process The same applies to MemberSets and Methods even though at least I read Methods to include MemberSets likewise with Properties. These appear to be a conscious effort on the PS team but I don't understand their reasoning. http://msdn2.microsoft.com/en-us/lib...mbertypes.aspx |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Why exclude PropertieSet from Properties? Personal opinion? It allows users to get the member types they want (and only the member types they want). With the current implementation I can do this: Get-Process | Get-Member -MemberType Property,PropertySet or Get-Process | Get-Member -MemberType Property or Get-Process | Get-Member -MemberType PropertySet Similarly if I want to get just note properties, I can do this: Get-Process | Get-Member -MemberType NoteProperty If Property gave me PropertySet types as well, I'd have to use a Where-Object call in the pipeline to filter them out. Why would you want to get property sets at the same time that you are getting properties? -- Kirk Munro [MVP] Poshoholic http://poshoholic.com "Bob Landau" <BobLandau@xxxxxx> wrote in message news:AB24A049-6160-4B32-87A1-106B94F4EE3F@xxxxxx
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) |
| Guest | Re: Why exclude PropertieSet from Properties? It's surprising that many parameters on many cmdlets actually take arrays, rather than the single items that we usually put in. A lot of hidden power. -Karl |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get-childitem -exclude bug | bep | PowerShell | 7 | 03-11-2008 07:47 PM |
| Exclude File | Kerry | Live Folder Share | 0 | 12-21-2007 07:17 PM |
| Cannot access properties in "local area connection properties" win | Samzabrus | Vista networking & sharing | 2 | 10-09-2007 10:00 AM |
| Bug in Get-ChildItem -exclude | loworbit@gmail.com | PowerShell | 4 | 12-19-2006 05:58 PM |