In this video, we go through how to use .NET and C# to create binary PowerShell cmdlets. Sample code can be found here: https://github.com/adamdriscoll/youtube/tree/main/PowerShell/Building%20Binary%20PowerShell%20Cmdlets/src
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.