Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert Powershell to C#

Is possible to convert PowerShell code .PS1 to C# code?

I'v been looking to it on google but I always find the contrary.

Reflector has the AddIn to convert DLL to PS Code, so I think it's possible..

like image 421
hello B Avatar asked Oct 19 '22 14:10

hello B


1 Answers

You can try this Visual studio code extension : PowerShell Pro Tools for VS Code https://ironmansoftware.com/powershell-pro-tools-for-visual-studio-code/

enter image description here

Convert between C# and PowerShell code to easily take snippets of either language and convert it to the other. Quickly create P\Invoke functions in PowerShell from C# snippets found on sites like Pinvoke.net.

like image 122
Ali Laraaj Avatar answered Nov 01 '22 08:11

Ali Laraaj