Reputation: 4384
I have 2 machines both with Power tools 2012. The following command works like it is supposed to on my local machine but does not return anything
(Get-TfsItemHistory "$MyItemspec").Changes
Any ideas? The folder structure is exactly the same on both the machines.
Upvotes: 0
Views: 148
Reputation: 109005
Are you running PSH 3 on one machine and V2 on another? V3 automatically applies properties that don't apply to the collection to each member.
On PSH V2 if Get-TfsItemHistory
returns multiple results then .Changes
will be null (no such property on a .NET array), but in V3 it will be applied to each of the objects. To get the same effect in V2:
Get-TfsItemHistory $MyItemspec | % {$_.Changes}
Upvotes: 1