PowerShell & Team Foundation Server


PowerShell, the bits formerly known as Monad. I imagine many of you have heard of it by now. If you’re like a lot of us in TFS Admin Ops, you’re also looking forward to kicking the tires and starting to figure out just how much you’ll be able to do with it.

Our team is considering employing PowerShell in a two significant areas:

  • Commandlets to perform common administrative/operational tasks: Imagine a commandlet to report the currently active web requests, or the most recent X events of a given category or higher;
  • Automation infrastructure: A commandlet to populate AD with a given set of users. Maybe another to take that set of users and give them a some initial permissions with TFS. Still another to validate those users have been modified as expected after using UI automation to modify them from the security/group membership dialogs in VS.

We’re particularly interested in the former because we think it might be a good extensibility point for those actions. If you can invoke and process output from PowerShell, you can do any of the queries/reports/actions we’ve implemented as a commandlet. Is that something you’d be interested in?

Registered users can grab the updated RC1 of PowerShell here.

 

If you want to destroy my sweater…


Comments (4)

  1. Keith Hill says:

    I may be on the fringe but as a developer who has to automate builds, source searches, etc.  I want a PowerShell equivalent of TF.EXE because frankly the output from TF.EXE was not designed for programmatic consumption.  The output is a real pain to parse and it doesn’t support pipelining.   That is, last I checked I could not feed the output of a command into TF.exe e.g.:

    dir /b /s /a-r *.cs | tf status

  2. Martin says:

    In addition to Keith’s comment it would be great to access the TF Version control repository with a PSDrive.

  3. CRathjen says:

    Thanks for the comments.

    Keith – definitely not on the fringe! A big part of the motivation for a command line client is to be a vehicle for scripting.

    As far as I know, the only way to pipe output into TF as input would be to pipe it to "tf @" and then each line of your input is treated as a separate command (basically the tf commands without the tf at the start). It won’t fix your dir example but it might help.

    Martin – I’d like to follow up with you about PSDrive – if you’d like, send me an email via the Email/Contact link at the top of the page.

  4. Aaron Hallberg on Team Build API: GetBuildURI and GetBuildDetails.

    Brian Harry on The Next TFS Power…