F.Y.I., same happens on a dataSet ( I noticed on my new Tabcompletion script)
PoSH>$dsTabExpansion
RemotingFormat : Xml
SchemaSerializationMode : IncludeSchema
CaseSensitive : False
DefaultViewManager : {System.Data.DataViewManagerListItemTypeDescriptor}
EnforceConstraints : True
DataSetName : TabExpansion
Namespace :
Prefix :
ExtendedProperties : {}
HasErrors : False
IsInitialized : True
Locale : en-US
Site :
Relations : {}
Tables : {, , }
Container :
DesignMode : False
PoSH>$dsTabExpansion.tables |% {$_.tablename}
Custom
Types
Wmi
gr /\/\o\/\/
http://ThePowerShellGuy.com
"Keith Hill [MVP]" <r_keith_hill@mailhot.moc.nospam> wrote in message news:e9C0NTRLHHA.1252@TK2MSFTNGP02.phx.gbl...
5> $x.To | %{"$_"}
john@doe.com jane@doe.com
6> $x.To | %{$_.ToString()}
john@doe.com jane@doe.com
7> ,$x.To | %{$_.ToString()}
john@doe.com,
jane@doe.com
Hmm.. BTW I do have a custom formatter for MailMesage which is the object that contains the MailAddressCollection but I haven't defined anything for MailAddress. Here's the MailMessage view which is just hiding extraneous properties:
<View>
<Name>System.Net.Mail.MailMessage</Name>
<ViewSelectedBy>
<TypeName>System.Net.Mail.MailMessage</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>From</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ReplyTo</PropertyName>
</ListItem>
<ListItem>
<PropertyName>To</PropertyName>
</ListItem>
<ListItem>
<PropertyName>CC</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Bcc</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Attachments</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Priority</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Subject</PropertyName>
</ListItem>
<ListItem>
<PropertyName>IsBodyHtml</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Body</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
BTW I still don't see the To entries when I remove this view definition so I don't think this view definition is causing the problem.
--
Keith
"Jeffrey Snover [MSFT]" <jsnover@ntdev.microsoft.com> wrote in message news:21BE4B87-95AC-4238-A1F1-D09CFBA7C6C3@microsoft.com...
Sorry. Actually I meant to ask for
5> $x.To | %{"$_"}
(I'm thinking that they might have a broken ToString(). If you look at the $X , it actually is printing out a list of 2 items but each item appears to be a null string.
To : {, }
jps