Hi Henning,
Thanks for posting the query and we are happy to help you regarding running PowerShell from Visual studio.
In PowerShell you have used .NET System.Management.Automation.Host.ChoiceDescription object.
This object allows to define different options and then use a .NET method called PromptForChoice() to display those options to the user.
Usually the dialogue box or prompt window will be rendered based on the framework or ISE we are using.
You can try installing respective modules searching from NuGet packages for PowerShell.
https://learn.microsoft.com/en-us/nuget/reference/ps-reference/ps-ref-install-package
For better understanding of using PowerShell in DotNet code, kindly refer following links.
https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/using-vscode?view=powershell-7.2
https://devblogs.microsoft.com/scripting/visual-studio-code-editing-features-for-powershell-development-part-1/
https://devblogs.microsoft.com/scripting/visual-studio-code-editing-features-for-powershell-development-part-2/
Here is a helpful page with information about Windows PowerShell
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/powershell
-----------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer.--