If the DLL is compiled based on the DOTNET framework and Visual Studio, You can reference it in powershell as follows.
1 # introduce DLL
2 [system. reflection. Assembly]: loadfrom ('d: \ test \ OLAP. Infrastructure. DTS. dll ') | out-Null
3 [system. reflection. Assembly]: loadfrom ('d: \ OLAP. infra. dll ') | out-Null
4
5 # create an object
6 $ log = new-object OLAP. infra. Logger
7 $ Lib = new-object OLAP. Infrastructure. DTS. dtsclientlib ($ log)
8
9 # method of calling the class library
10 $ status = $ Lib. getjobstatus ()
Because when you create a dtsclientlib object, you can pass in null.
1 # introduce DLL
2 [system. reflection. Assembly]: loadfrom ('d: \ test \ OLAP. Infrastructure. DTS. dll ') | out-Null
3
4 # create an object
5 $ Lib = new-object OLAP. Infrastructure. DTS. dtsclientlib @ ($ null)
6
7 # method of calling the class library
8 $ status = $ Lib. getjobstatus ()