I created a simple C# dll and registered it using RegAsm.exe. One very simple method is invoked without parameters and returns a number, here is a simplified versio
RegAsm.exe
Your method should be static or you need to create an instance of that type (TestClass).
static
Last can be done using
New-Object -TypeName -ArgumentList
Or in your specific case:
$test = New-Object -TypeName AVL_Test.TestClass $test.GetNumber()