I know this is an old question, but in case someone is looking for a solution later I thought I'd post an answer as I was going through old questions that don't have accepted answers. I don't how I didn't notice the error when I posted that comment in September last year.
$order.Shipments[0].ShipMethodName
is giving you Orders.OrderShipmentCollection[0].ShipMethodName
because NVelocity doesn't support indexers like C#, you need to use the get_Item()
method, i.e. $order.Shipments.get_Item(0).ShipMethodName
that is the underlying method the C# compiler creates for indexers.
What is happening is $order.Shipments
prints out the type name (Orders.OrderShipmentCollection
) and the rest [0].ShipMethodName
just gets printed verbatim.