Is it possible to call a .NET method from PowerShell with early binding?
I have a pipeline script which calls a single .NET method in process {...}
. PowerShell calls this method via reflection, and right now Invoke
(not the method itself, just reflection call) takes 70% of total execution time.
The method is always the same, so I would prefer to ask PowerShell not to use reflection at all.