Add PowerShell scripts support with intellisense
I use LinqPad to create tests and prove of concept scripts. It would be great if LinqPad supported PowerShell scripting to prepare some admin and infrastructure tasks as well. Intellisense would be essential.
-
Cy "kkm" K'Nelson commented
PowerShell ISE is no more for the new PowerShell, v6 and up. The official replacement is Visual Studio Code, but it's exactly what Visual Studio is to LinqPad w.r.t., e.g., C#. ISE was a nice tool to develop a 15-liner script. I used it to remove and deprovision Windows 10/11 bloat AppxPackages. It was convenient, as I list all candidate apps one per line in an array and comment out those that I do not want to remove in a particular installation; e.g. some are useful on a personal use thin low-perf notebook I travel with, but not on a desktop work-only workstation. Open the file in ISE, comment lines for apps that I want to retain, hit run, done. And I do not even have VS code on a notebook from this example. A perfect use case for LinqPad!
Pragmatically, LinqPad integration of the new OSS PowerShell engine with premium autocomplete seems a very marketable feature to me. A discounted PS-only autocomplete is a lucrative entry into the market of sysadmins, who script many automation tasks in PS but do not care about other languages. This is the group of users who certainly won't switch from ISE to the recommended VS Code. Too much hassle for these folks to learn and set up such a complex tool to work with PS, given it's not OOBE; it's a shell with a plain-text editor, and you need to set up plugins to work with any language. VS Code marketplace is generally a heap of low-quality add-ons where a first-class one is a rarity. Setting it up for a new language a less than pleasant experience (I could not set it up for a palatable experience for C#; @Payton-Byrd in a July 13,2021 comment noted having been in the same boat!). To set up C++ development on Linux, I had to read tons of blogs and articles and try this and that extension before settling on a fully functional environment.
Another boon is that sysadmins don't usually pay for software out of their own pocket, and orgs would rather purchase multi-license packs.
-
Payton Byrd commented
I love this idea and want to add my 22 cents worth...
1. This would make module development much easier as currently VS Code with the PowerShell extension is the only viable option and VS Code is horrible at debugging C#.
2. You could use the .Net Framework version for Windows PowerShell debugging and the .Net Core version for PowerShell 6+ debugging.
3. We really need a way to debug both PowerShell Script, and the CLR hosted by the Runspace at the same time. Nothing that I know of currently can do this.
4. Integrating PowerShell as a console in LinqPad would be a huge help overall.
5. Being able to .Dump() objects in PowerShell would be hugely useful.
-
Mark Stevens commented
Would love to see LinqPad support for powershell.
-
Andrew commented
I'm confused here, could you be explicit about how this differs from PowerShell ISE?
-
Johannes commented
out of votes but this would be great! A whole new segment of admins would open up for LinqPad!
-
Christopher Abichandani commented
I love LinqPad and I would love to use it for powershell!
-
JD Fagan commented
This would be a great Powershell Intellisense Interface!