Convert ps1 to C#

Hi,
i saw on youtube https://www.youtube.com/watch?v=bZ9PkG9M1SU possibility to automatically convert ps1 script to C# project.
Is this feature available ?
I have VS 2019 with installed tools with 14 trial licence added but i can’t force my VS to paste script as C# :frowning:

It could be a bug. Let me take a look and get back to you.

great, thanks, I’ll be waiting for info

I realize now that we need to update that video…here’s an example of how to use the code conversion feature. Just paste the C#, select it and then click Convert to PowerShell.

Sorry that this little recording cuts off what I click but it’s the option “Convert to PowerShell”.

Hv3HRRJ7YH

Can you do the opposite, i.e. convert PowerShell to C#. I can see convert to PowerShell but not convert to C#

Hi adam, I need to convert the .ps1 file to C# language in VS. Is it possible using PowerShell-pro-tools License in VS 2022? Could you please help me?