You can invoke C# from PS if you want:
https://learn.microsoft.com/en-us/powershell/module/microsof...