Earlier this week, I blogged about a neat little tool I built to convert C# to PowerShell. It’s still a work in progress but I wanted to make it even easier. Here’s another handy tool for using the code conversion service. I’ve developed a Chrome extension and REST API for converting C# to PowerShell.
You can add it here.
View as PowerShell, locates C# snippets on MSDN and StackOverflow and can replace them with PowerShell with a click of a button. On MSDN, each C# example should now have a View as PowerShell link available.
Clicking it will turn it into PowerShell.
The same functionality is available on StackOverflow.
It’s not perfect but should do a pretty good job of translating the code.
View as PowerShell and the C# to PowerShell converter are built on a REST API that you can call yourself. It’s as simple posting to the URL below with a JSON object that has a Content property.
Give it a shot yourself.