Influence the future of Windows sdk : Powershell based build environment

We are working on next version of the Windows SDK. One of the features in discussion is a PowerShell based build environment for Windows SDK. We would like to know what do you think about this feature. Do you see yourself using this?

Any information related to how you use our build environment will be of great help for us in making this decision.

Thanks in advance for your feedback!

Comments (62)

  1. If so SPEAK UP NOW .  The Windows SDK team is looking for feedback on whether this would be useful. 

  2. If so SPEAK UP NOW .  The Windows SDK team is looking for feedback on whether this would be useful

  3. YES, YES, YES

    Well, actually, I already do this; I sort of ported the SDK batch files into my powershell script profile (it even looks for 3.5/2008  first and if not found falls back to 2.0/2005).

    Seriously, for me, not having the SDK/VS build environment available in powershell was a big deterrent to using it as my day to day shell. It was only until I spent time setting it up that I could make powershell my default shell (and I ain't going back to cmd.exe)

  4. Henri Wiechers says:

    Absolutely. A build environment with the power of PowerShell would be awesome.

  5. Alexander Gornik says:

    PowerSHell should be the only build script out there.

    It should definitely replace MSBuild / XML files.

  6. vermorel says:

    Not sure whether my comment is relevant. But the thing that I would like to see would be more "interoperability" between MsBuild and PowerShell.

    - To be able (natively) to run MsBuild tasks from the PowerShell.

    - To be able (natively) to run PowerShell within MsBuild.

    For now, it ain't easy to do so; but if the integration (both ways) was nicely setup, I would most certainly put more PSH scripts into my builds.

    Best regards,


  7. Yes please.

    I am moving more and more tasks to PowerShell.  Having a PowerShell build environment would be very useful.

    I'd be happy to be involved in testing

  8. Devang Mehta says:

    I would say that such an environment would be god-send. We've tried msbuild for our environment and it is hard (and in some cases impossible) to do what we need it to do.

    We are building a hybrid web app with old perl code and new C# code in it. Our current build requires modification of code using regex's at deploy time. We are currently stuck with a perl build utility for that reason (and BTW, we love perl :-).

    We would love a utility that handles C# compilation and a full featured scripting language to do special things. It would be killer utility and powershell seems ideal for it.

    I don't think our situation is that unique, there must be so many applications facing a similar situation.

    Today, our options in migrating to C# are limited by legacy as well as convenience issues. And a hybrid architecture is very appealing if you do lots of quick development and future consolidation like we do.

    It would make sense for MSFT to remove those bottlenecks for us by giving us powershell build environment.

    Please do this!


  9. Lionel says:

    What is a "PowerShell based build environment"?  Is it: 1) an alternative to msbuild? 2) using powershell from inside msbuild? 3) an msbuild-like cmdlet?

    Anyway, it would be quite welcome.

  10. Skyrambler says:

    Some of the more interesting applications of Powershell, so far, have been in scaling administration.  Making things possible that you would not contemplate using existing technologies.  i.e. rebuilding and reconfiguring automatically 1000 x 2008 servers overnight for training purposes.  

    I can see interesting possibilities if the build environment had easy-to-use powershell support.

    Kindest Regards

    Mike Walker, Member of the PSUK group

  11. fangelico says:

    - To be able (natively) to run MsBuild tasks from the PowerShell.

    - To be able (natively) to run PowerShell within MsBuild.

    i agree on a 100%

    I think that more powershell on everything is a good thing 😀


  12. Bob Gregory says:

    I don't think that MSBuild interoperability is what's being discussed here. I think (and please correct me if I'm wrong) that we're talking about an actual PS build environment?

    Like Rake, only with PS. If so, yes, count me in.

  13. Matt Johnson says:

    This sounds like a great idea. I already use powershell for everything else, why not add it to helping me with my builds.

  14. Eric says:

    An extensible DSL is much better than XML config files.

  15. Yes! More PowerShell!

    On top of this, I'd also like to see build tasks that are scriptable by PowerShell (i.e. sort of like Rake with Ruby, or Bake with Boo). This may be what you're referring to and if so, I apologize for the duplication.

  16. Robbie Foust says:

    Yes!!! Powershell based build environment, please!

  17. Nick says:

    I agree with Joannes, that would be the most useful.  I still think most people are going to want to do builds using MSBuild.  But there are times when more power is needed, and a simple batch script is just plain out dated.

  18. ChrisW says:

    I think this would be a fantastic addition!!

  19. Jason says:

    I personally would really like powershell integration in the build environment.  I've been using CC.Net and NAnt for a couple of years and have recently been migrating it to msbuild and in doing so have found myself already converting a lot of the custom tasks to powershell rather than having dedicated task dlls that are harder to maintain.  So it would be very useful for me to have that already built in and supported by the build framework itself.  Glad to see you guys are already thinking ahead about it!


  20. Don Jones says:

    Indeed I'd like to see this. This is absolutely a task that needs to be automated in many circumstances, and PowerShell is ideal for task-specific automation. Plus, PowerShell acts as a very task-focused API that developers can build on top of.

    I have customers who frequently spend a great deal of time creating build scripts; a PowerShell-based environment would be more efficient to script as it'd be more task-centric, and it'd also enable them to leverage their growing skill set. Essentially, anything Microsoft produces that is scriptable or which needs automation should be done in PowerShell. Wow... a standard... think of it...

  21. Nick says:

    Yes, please look at some kind of harmonization between MSBuild and Powershell.

    Having some of the SDK command line tools implemented as Cmdlets would be useful too.

    Thanks for asking,


  22. I agree with the comment about using PowerShell more directly from MSBuild.  That might be enough to push us to use TeamBuild.  I currently prefer PowerShell's flexibility to MSBuild/TeamBuild so all our build scripts are written in PowerShell and we invoke msbuild from there.  I would also love to see native PowerShell cmdlet support for TFS (especially version control).  Still whatever extra PowerShell goodies I can get out of VS and/or the Windows SDK, I'll take them.

  23. PaulG says:

    I also agree that good interoperability with MSBuild would be great.  We are heavily invested in MSBuild scripts and build tasks.

  24. Dave Kingston says:

    I'm unsure what you're envisioning.  But I would like to put my two cents worth in.  I would like to be able to natively run MSBuild from Powershell.  This would be tremedously useful for error tracking in the build process and for numerous other custom requirements that some builds have.

    I'm actually amazed that it's as hard as it is right now.

    I've seen tutorials for using powershell in MSBuild, but it should be native as well.

    Anyway, yes.  Integration good.

  25. I'm not really a developer, but I write a bit of code in Visual Studio and I would love to see more integration with PowerShell.  My job as an admin in a Windows environment has me working with PowerShell on a daily basis and I would love the ability to transition what I know with  PowerShell into working with Visual Studio.


  26. Thomas Lee says:

    Yes please. Please create a PowerShell based build enviornment!

  27. Yes a PowerShell based build enviroment would be great.

  28. Robin van Dijk says:

    Yes please!!!

    From the moment I first worked with Powershell I was hoping that in the end it's going to completely replace / the old dos shell interface / vbscripting / etc. I support every action that's going to get us a step closer towards that goal.

    P.S. Although we can get msbuild and Powershell integration with some simple code (see the powershell team blog) I also like some official support for that, but perhaps this is the wrong site / blog to ask for that...

  29. JK says:

    YES, PowerShell build env would be good.

    But even better would be MSBuild & PowerShell integration:

    - using PowerShell scripts (inline and/or in-process) from MSBuild

    - running MSBuild (in-process) from PowerShell

  30. Ed says:

    I'd be one of the first to sign up to use this feature if it were made available.

  31. Andrew Tearle says:

    Anything PowerShell would appear to be 'a good thing' !



  32. Mac says:

    As long as you're at it, might as well offer some MSDeploy functionality as well in Power Shell.

  33. Cash Foley says:

    Building .Net Applications?  Maybe I'm missing the point, but MSBuild is great for "building" and it's part of the framework.

    What is the "gap" to be served by doing it in PowerShell?  Having MSBuild CmdLet(s) would be really nice.

  34. Staffan Gustafsson says:

    I second Joannès.

    Integration between MSBuild and powershell is the key.

    MSBuild will be a part of many builds. So will hopefully powershell.


  35. Dr Herbie says:

    Yes please!

    We don't really use MSBuild at the moment and tend towards Powershell (so we can use cmdlets update build numbers in our custom release tracking database) and getting VS to do the build (so it automatically does our MSI builds too).

  36. Arnaud says:

    Yes I think it is a very good idea !!!

  37. Sam Gentile says:

      Comments and trackbacks are back on after a futile battle with spam. I'll see how long it

  38. John Vottero says:

    PowerShell based build environment?  YES, PLEASE!!!

    A PowerShell script that creates appropriate aliases and variables would be a good start.  Long term, I think all command line tools should be PowerShell cmdlets.  

  39. Serfmum Yossarian says:

    Yes, definitely. Something along the lines of rake would be fantastic. PowerShake, anyone?

  40. Richard says:

    I think PowerShell anything would be a good thing too. Also besides the flexibility, PowerShell is still a command line shell so I see only positives so far...

  41. Erich Stehr says:

    Please!  The only cmd.exe windows I normally have on my screen now are for the build environment; everywhere else I can is now PowerShell.

  42. Adam says:

    Somewhat related and apparently quite some people are looking for it - running PowerShell scripts from MSBuild. Bart De Smet has a post on the topic at

  43. Nick Howell says:

    Integration between MSBuild and PowerShell would be fantastic! Hoping this will definitely get in.

  44. I have a build task that hosts a PowerShell runspace and I use it everywhere - trouble is that every task that I use ends up hosting a new runspace and that just takes a little time.

    What would be really useful is not just native integration between MS Build and PowerShell (as already suggested), but everything using PowerShell - from Visual Studio to all the little .exe that we end up running every day just to get something built and tested.

  45. David says:

    A number of cmdlets to provide parts of an application layer for integration could be usefull. Currently using (N)Ant for TDD deployment and similar system management scenarious could be more easily tested i.e. also considering instrumentation of apps towards proper Windows system integration. This could include the cloud like Windows Live Service etc. and provide for competive services as well by providing a reference solution for such a cmdlet bridging developments tools like Ant, MSBuild etc. with infrastructure. In one scenario one should be able to test production quality by simply integrating a set of cmdlets. The cmdlets to take prarameters. I.e. running a basic integrated system management test some app. configuration of subsystems and services on the WIndows Server System like:

    - Application platform (i.e. BizTalk, IIS, Sharepoint),

    - Data (fs, db etc.),

    - Deployment (msi, registration),

    - Desktop (wdm i.e desktop band,, fonts),

    - Hardware virtualization,

    - Informaton (i.e. Windows Search),

    - Management (GP, Log, System Center, WMI, RDP), TS, App. Comp, Process, Performance, Hardware, AD),

    - Media (Live, MCE, WMDC, Office, WM, XNA), Network)

    This kind of use would be the natural choice for a Power Shell - and such tests could be automated and provided by MS. I.e. a basic example: a professional development project for Windows Server should log to the event log ... so during development, if app throws execeptions or similar without some special logging (beyond Windows native) to the event log the it could fail the test. Powershell can be used to and does already have a number of reference solutions for Windows host enviroment. So I think Powershell should be taken more in its own direction and development perspective giving good support for the managing the host enviroment. There are better tools like MSBuild and (N)Ant to support developers with the build task itself. This more extends to Test Driven Development where I see Powershell to help verify proper behaviour or even suggest to implement a feature based on lack of behaviour in a test-deployment scenario on a local or non-local Windows platform.



  46. Ravi says:

    Yes Powershell based build environment is a welcome idea. I would like to see Powershell everywhere!!! 🙂

  47. Georg Begerow says:

    Yes, please! We currently use a combination of PowerShell which drives NAnt which drives MSBuild. The Nant support is historical, but we never found a reason to rewrite everything in MSBuild as NAnt is more flexible. So far we used Subversion as Repository and NUnit as Unittestframework. Newer projects are going to use TFS only. Subversion and NUnit are supported by Nant so we can drive our nightly build with this. TFS ist missing the nessecary support in NAnt, MSBuild and as of today, Powershell. Some of the features are currently made available via c# wrapper around TFS Webservices but the result is currently .... suboptimal.

    To use Powershell as build environment we strongly need to fully control TFS, including CheckOut/CheckIn, automated Unittests, building Workitem via Powershell, complete workitems etc.

    Also must powershell reflect the settings in solutions and projects. Last week I spend two hours searching an error which was caused by not synchronizing a conditional Symbol into the build script.

  48. TimK says:

    Powershell based build environment, would this be something like winpe + powershell? If so I could really use something like that. Were I work we still use Win XP and I currently use winpe + vbscript + wmi but then change to Powershell once the OS has been deployed. It would be nice to leverage my knowledge into one shell (Love Powershell and the use of .net objects) but I have to be creative with batch files and script when I perform tasks with winpe.

    Thanks again.

  49. Stefan Didak says:

    Yes. YES! Absolutely. I've already been using PS to build up my build automation management. Anything that would help minimize my efforts would be VERY welcome!

  50. Tim says:

    I would love to see a PowerShell based build environment. At the moment, I use cmake to get myself a Visual Studio project, which works OK, but I would much prefer to be able to interact with MS compilers via PowerShell.

  51. O.Z. says:

     PowerShell build environment is the MUST. With all the features of GNU build system and no less.

  52. Jeffrey Snover (PowerShell Architect) pointed to Nanda's post asking for feedback for the Windows

  53. John Taylor says:

    A Powershell based build environment would be extremely useful.

  54. I have used many flavors of make, nant, ms-build.

    I have many different build systems for many project over 15 years for several large organizations.

    Powershell would make a very powerful build platform. It has all the logical and pattern matching functionality you could desire.  The big thing it brings to the table for me is the fast and easy integration of .Net interfaces and assemblies into the script environment.

    As other MS products get Powershell enabled, its utility as glue code becomes obvious.  

    It really opens up the world to the scripter to be able load and run assemblies on the fly.

    The opportunities to unit test generated code on the fly are really exciting.

    Please bring Powershell into the next release of Visual Studio.

    It would be powerful 🙂

  55. Mike Langley says:

    I have to agree that MSBuild/TFSBuild should be accessable from PowerShell and visa versa. I use powershell everywhere I can and would even be much happier if the Windows Plateform were to actually adopt PS as its command line instead of the outdated command line of today.

  56. Damian Reeves says:

    This would be far beyond useful.

  57. Denis Vuyka says:

    I think this feature will be very useful. Especially native TFS support and launching of tests

  58. John says:

    I'd appreciate a PowerShell-based build environment. Here's an article on CodeProject about the PowerShell build environment that we created for our deployments at my work. Maybe you could reduce our script down to a dozen lines by providing things we had to create from scratch.

  59. Richard says:

    Yes, Powershell Build environment would be cool. Also, having builtin Powershell scripting for Pre-build and post-build in VS 2008.

  60. piers7 says:


    XML based syntaxes like NAnt and MSBuild are all very well for the IDE to spit out, but they're a major pain when it comes to writing your own custom stuff (unless you bit the bullet and compile them as Tasks). You loose variable scope and explicit parameters, have to learn a whole new syntax that bends over backwards to express 'codey' concepts in markup and kiss goodbye to any intellisense / debugging tool support.

    A Powershell DSL for build that understood the VS solution / project file structure would be a major asset here. I'm envisaging that this would be something that would run hand-in-hand with MSBuild, probably in the role of orchestrating the overall 'uber' build process (ie the bits before and the bits after the solution build) in much the same way that the 'controlling' msbuild file for a Team Build does now. These are the bits where - in build processes I've put together - we take care of things like database snapshots and packaging the final build outputs into an xcopy ready form (which Team Build makes a real hash of).

  61. Hans says:

    Yes.  PowerShell has much more powerful syntax and is more customizable than MSBuild.  

  62. i thought i saw a channel9 pres tween jeffery snover and bruce payette, where bruce demo'd something called poshmake which was described as "rake related" -- the demo did some neat things; the whole thing (the make stuff) was done in about 250 line of posh code -- seemed like the way to go to me

Skip to main content