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.
- Create an external command (Tools | External Commands) that does what you want.
- From the menu select Tools | Customize
- In the dialog go to the Commands tab
- Select the toolbar you want to add the command to
- Click Add Command
- 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.