Run my third-party DLL file with PowerShell

Yes, you can:

Add-Type -Path $customDll
$a = new-object custom.type

You call a static method like so:

[custom.type]::method()

Instead of Add-Type, you can also use reflection:

[Reflection.Assembly]::LoadFile($customDll)

(Note that even the above is calling the Reflection library and the LoadFile static method.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)