Is it possible to add DLL that implements PowerShell cmdlet to C# project and call its functions as you normally do with classes? The problem is that cmdlet doesn't have suitable functions to call. It has invoke
and other stuff instead.
As far as I understand another way to do it is to use System.Management.Automation
Namespace. But I'm afraid that it will cause performance overhead if I run the function like 7000 times in a row.
To be exact I have a comdlets like Remove-NAVApplicationObjectLanguage
for MS Dynamics Nav that process files and 7000 files to process. I want to wrap it into the library and call it with my additional processing in a way convenient for me.