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 166589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:07:27+00:00 2026-05-11T12:07:27+00:00

Currently trying to build a script utilizing cmdlets from the MS released Team Foundation

  • 0

Currently trying to build a script utilizing cmdlets from the MS released ‘Team Foundation Server Power Tools’ package.

I’m attempting to flow command logic from the success or failure of the ‘Update-TfsWorkspace‘ cmdlet however I can’t seem get a return code out of the call nor can I capture the output using Out-String. I’m using Powershell v1.

update-tfsworkspace 'C:\doesnotexist\' -recurse -version T 

Yields a message of ‘Unable to determine the workspace.’ which is the error I’m trying to catch.

$ret = update-tfsworkspace 'C:\doesnotexist\' -recurse -version T 

Is expected to give me a $true/$false indicating success/fail but doesn’t work.

update-tfsworkspace 'C:\doesnotexist\' -recurse -version T | Out-Null 

Is expected to prevent the cmdlet from writing the message but doesn’t work.

trap{echo 'fail'} update-tfsworkspace $workspace_path -recurse -version T 

Is expected to catch an error and write ‘fail’ but doesn’t work.

$msg = update-tfsworkspace $workspace_path -recurse -version T | Out-String 

Is expected to populate a $msg variable with the host output but doesn’t work.

I’m totally out of ideas here. Help would be appreciated!

  • 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. 2026-05-11T12:07:28+00:00Added an answer on May 11, 2026 at 12:07 pm

    Little hacky, but since I don’t have TFS to try to figure something else out, see if this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 175k
  • Answers 175k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Cocoa.h (the main header file of the Cocoa framework) is… May 12, 2026 at 2:59 pm
  • Editorial Team
    Editorial Team added an answer Have a look at features/step_definitions/webrat_steps.rb, the following step definition looks… May 12, 2026 at 2:59 pm
  • Editorial Team
    Editorial Team added an answer Just at the moment of writing my question I found… May 12, 2026 at 2:59 pm

Related Questions

I'm currently trying to build (a simpler version of) a status website similar to
I'm building an R package and need to build a jni library for OSX
I've written a PHP script that handles file downloads, determining which file is being
I'm currently trying to reduce the time taken to compile and unit test projects

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.