Question

Has anyone found a plugin for Visual Studio to allow for PowerShell syntax highlighting or IntelliSense? If not, does anyone have any idea why not? I keep hoping someone else with copious free time would have tackled this by now. I have hope since other folks have managed to take the limited documentation and build custom IntelliSense providers for other languages such as NHaml.

Edit: To clarify,I'm not looking for a list of IDEs that can be used to develop PowerShell . I spend 90% of my day in Visual Studio. It already does a really good job of slicing and dicing code. That is the IDE I prefer to use to edit all text and code. The lack of PowerShell syntax highlighting now that I work with PowerShell scripts is down right painful.

Was it helpful?

Solution

Here's a useful one: PowerGUI VS Extension.

OTHER TIPS

Update 2013-08-20

Adam Driscoll has recently announced the PowerShell Tools for Visual Studio as successor of his former PowerGUI Visual Studio Extension - see his blog post about The Future of PowerGUI VSX for details, where he acknowledges the drawbacks of the predecessor outlined by Simon Gillbee (see previous update below) and describes how they will be addressed by removing the dependency on PowerGUI:

[...] By embedding the PowerGUI editor directly in Visual Studio it caused a multitude of problems because it really wasn’t a true language integration but more like a hack.

[...] PowerGUI VSX v2 will offer true Visual Studio language support for PowerShell. It uses the Visual Studio editor and the raw PowerShell debugger, tokenizer and completion engine. Currently, the requirement is PowerShell v3 and Visual Studio 2012. This requirement may change depending on community support and adoption. [emphasis mine]


Update 2013-07-31

Simon Gillbee has just referenced/promoted a PowerShell syntax highlighting alternative, that doesn't expose the drawbacks of the PowerGUI Visual Studio Extension he previously summarized:


Initial Answer

The recently released PowerGUI Visual Studio Extension adds PowerShell IntelliSense support to Visual Studio. While it depends on the (free) PowerGUI graphical user interface and script editor, reusing this editor component should be a sign of maturity rather than an impediment I'd hope. (See Kirk Munros PowerShell support in Visual Studio! blog post for an introduction.)

Being a 1.0 there are still some minor issues with the extension as such, but Adam Driscoll seems to be pretty active tackling these - the PowerShell syntax highlighting and IntelliSense support is working most excellent for me already!

I have not seen anything about Visual Studio Intellisense for PowerShell scripts.

I recommend you to try some other tools like:

Look this screen cast:


(source: aaronlerch.com)

The PowerConsole extension for VS2010 is very nice and looks promising. I am not sure though that it is suitable (or able) to edit scripts. It is worth to try in any case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top