Let's say there is a powershell command Do-Something
, from the library C:\dosth.dll
, which is based on .NET Framework 4.5.
How do I directly perform the action (just as I use Do-Something
in Powershell) through this library dll?
Something like
Assembly dosth = new Assembly("C:\dosth.dll");
...
The problem is, the command is actually a class in .NET, how do I construct an instance correctly with right properties, and which method should I call to perform the command?