Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3599680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:23:52+00:00 2026-05-18T20:23:52+00:00

When using PowerShell to extract information from TFS, I find that I can get

  • 0

When using PowerShell to extract information from TFS, I find that I can get at the standard fields but not “Custom” fields. I’m not sure custom is the correct term, but for example if I look at the Process Editor in VS2008 and edit the Work Item type, there are fields such as listed below, with Name, Type and RefName:

Title         String    System.Title
State         String    System.State
Rev           Integer   System.Rev
Changed By    String    System.ChangedBy

I can access these with Get-TfsItemHistory:

Get-TfsItemHistory "$/path" -Version "D01/12/10~" -R 
  | Select -exp WorkItems | Format-Table Title, State, Rev, ChangedBy -Auto

So far so good.

However, there are also some other fields in the WorkItem type, which I’m calling “Custom” or non-System fields, e.g.:

Activated By  String    Microsoft.VSTS.Common.ActivatedBy
Resolved By   String    Microsoft.VSTS.Common.ResolvedBy

And the following command does not retrieve the data, just spaces.

Get-TfsItemHistory "$/path" -Version "D01/12/10~" -R 
  | Select -exp WorkItems | Format-Table ActivatedBy, ResolvedBy -Auto

I’ve also tried the names in quotes, the fully qualified refname, but no luck. How do you access these “non-System” fields?

Thanks

Boz

UPDATE:

From Keith’s answer I can get the fields I need:

Get-TfsItemHistory "$/Hermes/Main" -Version "D01/12/10~" -Recurse `
  | Select ChangeSetId, Comment -exp WorkItems `
  | Select ChangeSetId, Comment, @{n='WI-Id'; e={$_.Id}}, Title -exp Fields `
  | Where {$_.ReferenceName -eq 'Microsoft.VSTS.Common.ResolvedBy'} `
  | Format-Table ChangesetId, Comment, WI-Id, Title, @{n='Resolved By'; e={$_.Value}} -Auto

Notes:
Renaming of WorkItem’s Id to WI-Id necessary because Id is ambiguous with Field Id.
Renaming the Fields Value property gives a column heading name instead of “Value”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:23:53+00:00Added an answer on May 18, 2026 at 8:23 pm

    There is a Fields collection property in each work item that appears to contain all the work item fields and values. Access it like so:

    Get-TfsItemHistory . -r -vers "D12/14/2010~" | 
        Where {$_.WorkItems.count -gt 0} | Select -Expand workitems | 
        Select @{n='WIT-Id';e={$_.Id}},Title -Expand Fields | 
        Where {$_.ReferenceName -eq 'Microsoft.VSTS.Common.ActivatedBy'} | 
        Format-Table Value,WIT-Id,Title -auto
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using PowerShell to extract information from TFS, I find that I can get
I'm using PowersHell to automate iTunes but find the error handling / waiting for
Using PowerShell I can get the directories with the following command: Get-ChildItem -Path $path
I would like to extract certain rows from a log file using native Windows
My mission is to graduate from using PowerShell to create an instance of Outlook
I'm trying to install some custom Windows services using PowerShell, and I've been unable
I am attempting to pull some information from my tnsnames file using regex. I
Using Powershell, I am attempting to get a list of folders and files beginning
Using either Powershell or VBS, how can I make all of the users within
When using powershell, sometimes I want to only display for example the name or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.