Let's look at the get_object_status method first. The signature for that method is:
MemberObjectStatus [] [] LocalLB.PoolMember.get_object_status(
in String [] pool_names
);
The returned value is a 2-D array of MemberObjectStatus structures, one array for each pool_name passed in with the pool_names array.
The MemberObjectStatus structure is defined as follows:
struct MemberObjectStatus {
IPPortDefinition member;
ObjectStatus object_status;
};
struct IPPortDefinition {
string address;
long port;
};
struct ObjectStatus {
AvailabilityStatus availability_status;
EnabledStatus enabled_status;
string status_description;
};
In your code, you are relying on PowerShell to extract all the sub arrays/structures in it's default table formatting and PS doesn't have the TypeData information abailable to do so. You'll need to store the values in a variable and access the child elements and print them out accordingly.
Look at the CodeShare entry I wrote on PsPoolMemberControl for an example of using that method and interrogating the results:
http://devcentral.f5.com/wiki/default.aspx/iControl/PsPoolMemberControl.html
Click here
You would look into the get_session_status output in a similar fashion to get the results for that method.
In the future, if you go into the API reference for the method you have a question about, at the bottom of the page, there are links to relevant sample code that use that method. On the LocalLB.PoolMember.get_object_status page
http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__PoolMember__get_object_status.html
Click here
there are several PowerShell samples that you can refer to.
Hope this helps and please don't hesitate to post more questions if they come up.
-Joe