I am writing a Powershell cmdlet to list changesets from TFS. I successfully request TFS and get a collection of change sets, but I want to return simplified objects that contain only a few properties. I can do it with Select-Object like this ...
$changesets | Select-Object ChangeSetId, Owner, Comment
The last property I would like to add is the Changes property, which is an array of changes. I would also like to simplify these objects. I am trying to do this, but it does not return what I want ...
$changesets | Select-Object ` ChangeSetId, Owner, Comment, @{Name="Changes"; Expression={ $_.Changes | Select-Object ChangeType, ServerItem }}
Is there a way to handle nested collections using Select-Object ?
source share