An extensible PowerShell command window for Visual Studio.

(8) Review
Visual Studio
Download (22,038)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (8)
Q and A (21)
Sign in to write a review
Sort by:

by imaudi | January 14 2014

Would *love* to see a version of this for Visual Studio 2013. If it's open source, I'd volunteer to help out!

by Pascal Saille | July 20 2012

by Manesh Karunakaran | December 07 2011

by wekempf | April 30 2010

The idea is excellent, the execution leaves a bit to be desired. First, there seems to be zero support for profiles... i.e. this isn't a true PowerShell host environment. When started, no profile scripts are run. Worse, I received several errors. Despite this, we do have a working PowerShell prompt within Visual Studio, which is just what I wanted. The integration with various services and variables giving you access to the IDE within the prompt is wonderful. Unfortunately, not being a real PowerShell host environment continues to rear it's ugly head. Remember when I said profiles aren't run? Well, that means my customizations aren't applied. Most importantly, this means various modules I really on (like PSCX) aren't loaded. So, I try load one (specifically PSCX), and it fails. I can't load any modules successfully, meaning I'm in a very crippled PowerShell environment. Unless/until these issues are fixed, I won't be using this extension. :(

by Troy Goode | April 23 2010

by Greg Duncan | March 15 2010


In hindsight this seems so obvious... Thanks for making this available.

by Doug Finke | March 14 2010

This is great! Huge potential.

by MKPotluri | March 04 2010

Works like a charm!

Sign in to start a discussion

  • Is there a way to change the prompt?
    1 Posts | Last post January 14, 2014
    • I'd like to show the current directory rather than PS>
      I've tried overriding the prompt function, but it has no effect.
  • VS2012 version and/or source release?
    4 Posts | Last post February 27, 2013
    • Can either a VS2012 version be published (ideally available in the VS2012 Extensions like it was in VS2010) or the project opened up so others of us can help add the VS2012 support to it?
    • I've had a discussion with NuGet team. NuGet forked this extension and supports the same functionality across all VS versions including Express SKUs. Please try out NuGet and see if that meets your needs.
    • I just stumbled upon this post, and was wondering, where would I find this NuGet Powershell Console extension? I cant seem to find it in the package manager inside VS 2012, or on the gallery site.
      I would love to have this extension working in VS 2012, due to the lack of VB-Macro support.
    • VS 2012 might have changed some names. If you have Tools -> Library Package Manager -> Package Manager Console, that is the NuGet Powershell console.
      Otherwise, go to Tools -> Extensions and Updates... -> Online and search for NuGet.
  • PowerShell 3.0 breaks line continuation in PowerConsole?
    2 Posts | Last post November 21, 2012
    • The last time I used PowerConsole, I was able to paste in a multi-line statements and it worked great.  Now, with VS2012 and PowerShell 3.0 installed (not sure if it's the 3.0 install that caused this change or something in VS2012 RTM), when I try to paste in a multi-line statement, it no longer waits for the end of the block, but fails on parsing immediately.
      Somewhat scary, it fails even if I provide what I believe to be the line continuation character (backtick) at the end of the line
      For instance (snipping some of the error text to fit into the 2000 character limit)
      PS> $PSVersionTable
      Name                           Value                                                                                                                                     
      ----                           -----                                                                                                                                     
      PSVersion                      3.0                                                                                                                                       
      WSManStackVersion              3.0                                                                                                                                       
      CLRVersion                     4.0.30319.17929
      PS> foreach ($project in $dte.Solution) {
      Missing closing '}' in statement block.
      PS> foreach ($project in $dte.Solution) `
      At line:1 char:36
      + foreach ($project in $dte.Solution) `
      +                                    ~
      Missing statement body in foreach loop.
      PS> function foo {
      Missing closing '}' in statement block.
    • Could you please try the same scenario in NuGet console?
  • Intellisense?
    3 Posts | Last post September 12, 2012
    • I see intellisense in your screenshots, but I don't get any in the console.  Tab, ctrl-j, nothing I can think of works.
    • Don't know what happened... Yes, it is supposed to have intellisense through Tab expansion. Did you get any error message logged in the window? Did you customize PowerShell function "TabExpansion"?
      Just in case: The intellisense works the same way as in PowerShell console. You have to type part of something existing and then pressing Tab will complete it for you.
    • I have the same problem and nailed it down to the usage of Resharper.
  • Automate a Publish
    1 Posts | Last post September 08, 2012
    • Xu, thanks a lot for the extension.
      I was wanting to use it to publish a project but I get an error when I run the command below in the ouput window.  Any suggestions.
      $sb.PublishProject('Release|Mixed Platforms', 'C:\NEOv2\NEOv2\NEOv2.csproj', $false)
      Error(in output window):
      Error: Object reference not set to an instance of an object.
      ========== Publish: 0 succeeded, 0 failed, 0 skipped ==========
      This command works:
      $sb.BuildProject('Release|Mixed Platforms', 'C:\NEOv2\NEOv2\NEOv2.csproj', $false)
  • Hello,Question about stdout
    1 Posts | Last post July 31, 2012
    • This control is quite good, I also do a same form to get powershell's stdout .
      in c# I used process class to create powershell.exe
      but when I read stdout, I couldn't read anything but 'Windows PowerShell
      Copyright (C) 2009 Microsoft Corporation. All rights reserved.'
      I don't understand what is wrong, do you? Thanks...
  • Visual Studio 11 support?
    2 Posts | Last post April 12, 2012
    • Is there a way to get this to run inside VS11?  Currently if I search for PowerConsole within the VS11 Beta extension manager (in Online Extensions) there aren't any matches.
      For some other extensions, just modifying the build to change the supported versions to include 11 was all that was needed, and I'm guessing that's the case here, too?
    • FWIW, I confirmed that just adding VS11 as supported was sufficient (at least for a simple case of trying File.NewProject)
  • Open source?
    1 Posts | Last post February 13, 2012
    • Heya, very nice tool! Do you consider open source it, so people can add some pretty important features like the custom prompt? Cheers, Alex
  • Hangs during long running command
    2 Posts | Last post September 09, 2011
    • Great extension... it's very handy to have PowerShell right there in studio, especially with access to $dte.
      I find though, that when executing a long running command, the whole of studio hangs until the command has finished. As I use a few external build / test scripts it would be good to be able to continue working while commands are running.
      Is there a workaround for this?
    • It has this problem because of a bug in .NET. Implementing it in async pattern could easily hang Visual Studio. Sorry I don't know of easy workaround. You can probably try PowerShell's job facility for some scenarios.
  • How to access project configuration from PowerShell?
    2 Posts | Last post July 18, 2011
    • Hi
      Thanks for providing a handy tool to control Visual Studio from command line. I wrote a couple of scripts in IronPython but decided to switch to PowerShell because it is better for executing one-line commands.
      I found that PowerShell lacks some IronPython's abilities of control VisualStudio when it comes to deal with COM-objects.
      Have a look:
      py> dte.Solution.Projects.Item(1).Object.Configurations
      <Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCCollectionShim object at 0x000000000000002E [Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCCollectionShim]>
      py> [x.Name for x in dte.Solution.Projects.Item(1).Object.Configurations]
      ['Debug|Win32', 'Release|Win32']
      py> dte.Solution.Projects.Item(1).Object.Configurations.Item(1).Tools.Item('VCNMakeTool').BuildCommandLine
      'scons -j9 --arch=amd64'
      But nothing in PowerShell
      PS> $dte.Solution.Projects.Item(1).Object.Configurations
      PS> $dte.Solution.Projects.Item(1).Object.Configurations.Item(1).Tools.Item('VCNMakeTool').BuildCommandLine
      You cannot call a method on a null-valued expression.
      At line:1 char:58
      + $dte.Solution.Projects.Item(1).Object.Configurations.Item <<<< (1).Tools.Item('VCNMakeTool').BuildCommandLine
          + CategoryInfo          : InvalidOperation: (Item:String) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
      How to access the project configuration from PowerShell ?
    • Hi Zheng Xi,
      Sorry to reply late. I have also seen that PowerShell has problems interacting with COM. I have built in a small utility "Get-Interface". Probably you can work around using this utility.
      PS> $dte.Solution.Projects.Item(1).Object
      format-default : The field/property: "project" for type: "Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectShim" differs only in case from the field/property: "Project". Failed to use non CLS complia
      nt type.
      PS> $p = Get-Interface $dte.Solution.Projects.Item(1).Object ([Microsoft.VisualStudio.VCProjectEngine.VCProject]) 
      PS> $p.Configurations | %{ $_.Name }
      I don't know much about the project system / interfaces. Hope you can work around with the above.
1 - 10 of 21 Items