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

  • SEARCH
  • Home
  • 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 7863577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:31:42+00:00 2026-06-02T23:31:42+00:00

Is it possible to format powershell output so that it renders as a collapsible

  • 0

Is it possible to format powershell output so that it renders as a collapsible section in the TeamCity build log, Tree view?

So for example, my build step uses a powershell runner, and issues a

write-host " #################  deployment manifest ############################"
ls -r -i *.* | %{ $_.FullName }

which outputs this:

[15:28:13] #################  deployment manifest ############################
[15:28:13]\\10.10.10.49\d$\sites\account.foo.net\v32\Bin
[15:28:13]\\10.10.10.49\d$\sites\account.foo.net\v32\contact
[15:28:13]\\10.10.10.49\d$\sites\account.foo.net\v32\Content
[15:28:13]\\10.10.10.49\d$\sites\account.foo.net\v32\controls
[15:28:13]\\10.10.10.49\d$\sites\account.foo.net\v32\error

I’d like that chunk of the log to be collapsible in the Tree View.

  • 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-06-02T23:31:44+00:00Added an answer on June 2, 2026 at 11:31 pm

    Yes we do this with our powershell scripts, you need to get your build script to update Teamcity with the build status. More specifically you need to report the build progress which will tell Teamcity when the start and the end of a block of work occurs. After the build has finished Teamcity will use this information to create nodes on the tree view of the log.

    In powershell do the following:

    write-host "##teamcity[progressStart '<message>']"
    
    do work
    
    write-host "##teamcity[progressFinish '<message>']"
    

    Note You need to make sure that the message is the same in the start and finish message, blocks can be nested. You can also use the block message instead. I don’t know exactly what the difference is but you appear to get the same results:

    write-host "##teamcity[blockOpened name='<blockName>']"
    
    do work
    
    write-host "##teamcity[blockClosed name='<blockName>']"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application sends Facebook notifications to a user. Is that possible to format the
Possible Duplicates: Is String.Format as efficient as StringBuilder C# String output: format or concat?
Possible Duplicate: Create Excel file in Java How to save output in excel format
Is that generally possible? Is the console able to format a link so that
Is it possible to format a ComboBox item in C#? For example, how would
Is it possible to format a number to 2 decimal places with Smarty PHP?
Is it possible to format price according to rules like this using DecimalFormat in
CAST(IH.InvoiceDate AS date) AS InvoiceDate this returns 2012-03-16 is it possible to format this
Possible Duplicate: Calling NSLog from C++: “Format string is not a string literal (potentially
Is it possible to customize a django application to have accept localized date format

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.