Can a shortcut button be added to a VS11 toolbar to point at a powershell script/command?

Since support for macros has finished for VS11, is it possible to add a button to point to a powershell script (saved as a file, or somehow similar to a macro), or to execute a single powershell command?


Context This would be to kill all the webdev servers:

Stop-Process -processname WebDev.WebServer40

So if there's any other quick way to do that (other than typing the command/script path in the powershell enabled Package Manager Console or other console), would be useful.

Answers


  1. Create an external command (Tools | External Commands) that does what you want.
  2. From the menu select Tools | Customize
  3. In the dialog go to the Commands tab
  4. Select the toolbar you want to add the command to
  5. Click Add Command
  6. In the popup locate the Tools category and select External Command N where N is the command number for your powershell call.

If the toolbar is visible as soon as you close the popup the command will appear in the toolbar with the name you gave it. Close the dialogs and you'll be all set.


Need Your Help

Where is C library?

perl configure msys mingw-w64

I tried to configure perl-5.18.2.

Optional Parameter Usage while implementing an interface

php interface laravel

I am making use of the laravel orm component and observed the following when i deployed the life server.