Format-List shows object properties, but I cannot access any of those properties?? (object from NetApp DataOnTap module)

Here is a listing from a PowerShell ISE session where I have an object, $e, with a few properties.  Format-List shows values for some of the properties.  But if I try to access any of the properties in the usual way as $e.propertyname, I get a null result every time.

Can anybody explain how this is  possible??

The object in question is output from a NetApp DataOnTap powershell module Get-NaNfsExportStoragePath command.  But I don't think that is really relevant.  The Powershell version is the 2.0 on Windows 7+SP1.
 



________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $e | get-member


   TypeName: DataONTAP.Types.Nfs.SecurityRuleInfo

Name            MemberType Definition                                                                                                                        
----            ---------- ----------                                                                                                                        
Equals          Method     bool Equals(System.Object obj)                                                                                                    
GetHashCode     Method     int GetHashCode()                                                                                                                 
GetType         Method     type GetType()                                                                                                                    
ToString        Method     string ToString()                                                                                                                 
Validate        Method     System.Void Validate()                                                                                                            
Anon            Property   System.String Anon {get;set;}                                                                                                     
Nosuid          Property   System.Nullable`1[[System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] Nosuid {get;set;}
NosuidSpecified Property   System.Boolean NosuidSpecified {get;set;}                                                                                         
ReadOnly        Property   DataONTAP.Types.Nfs.ExportsHostnameInfo[] ReadOnly {get;set;}                                                                     
ReadWrite       Property   DataONTAP.Types.Nfs.ExportsHostnameInfo[] ReadWrite {get;set;}                                                                    
Root            Property   DataONTAP.Types.Nfs.ExportsHostnameInfo[] Root {get;set;}                                                                         
SecFlavor       Property   DataONTAP.Types.Nfs.SecFlavorInfo[] SecFlavor {get;set;}                                                                          



________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $e


Anon            : 
Nosuid          : True
ReadOnly        : 
ReadWrite       : {all-hosts}
Root            : 
SecFlavor       : {sys}
NosuidSpecified : True




________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $e.nosuid

________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $e.ReadWrite

________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $e.nosuid | get-member
Get-Member : No object has been specified to the get-member cmdlet.
At line:1 char:23
+ $e.nosuid | get-member <<<< 
    + CategoryInfo          : CloseError: (:) [Get-Member], InvalidOperationException
    + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand
 

________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1      



________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PS C:\Windows\system32> $PSVersionTable

Name                           Value                                                                                                                                                                                                                               
----                           -----                                                                                                                                                                                                                               
CLRVersion                     2.0.50727.5485                                                                                                                                                                                                                      
BuildVersion                   6.1.7601.17514                                                                                                                                                                                                                      
PSVersion                      2.0                                                                                                                                                                                                                                 
WSManStackVersion              2.0                                                                                                                                                                                                                                 
PSCompatibleVersions           {1.0, 2.0}                                                                                                                                                                                                                          
SerializationVersion           1.1.0.1                                                                                                                                                                                                                             
PSRemotingProtocolVersion      2.1  

Open in new window

LVL 12
Carlo-GiulianiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

footechCommented:
Run
$e.GetType()
Is it an array?  Probably.

With PS 2.0 you would need to do something like
$e | ForEach { $_.Nosuid }

Open in new window


If I've remembered all this correctly, it wasn't until PS 3.0 that you could reference a property name using dot notation on an array object.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
That's correct, footech.

 ,$e | gm
is said to tell the real type of container vars instead of the array elements.
0
footechCommented:
I remember switching between something like
$e | gm
#and 
gm -Inputobject $e

Open in new window

to check out the properties and methods in various circumstances.  Looks like the way you mentioned is equivalent to using the -inputobject parameter (and I can see why).
0
Carlo-GiulianiAuthor Commented:
Duh.  That's what it is.    I should have realized that.

Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.