vbscript - How to use PowerShell to access methods and properties of a Third-Party OLE DLL? -
i trying write powershell script access methods , properties of third-party ole dll.
the software vendor provided working example in vbscript achieve same result. below excerpt of codes:
set objole = createobject("netiqole.appmanager") objole.logon strinstance, strrepository, struserid, strpwd ... however, when tried code in powershell below:
$objole = new-object -comobject "netiqole.appmanager" $objole | get-member i got output below , didn't see relevant method or property.
typename: system.__comobject name membertype definition ---- ---------- ---------- createobjref method system.runtime.remoting.objref createobjref(type requestedtype) equals method bool equals(system.object obj) gethashcode method int gethashcode() getlifetimeservice method system.object getlifetimeservice() gettype method type gettype() initializelifetimeservice method system.object initializelifetimeservice() tostring method string tostring() is there can access ole dll's methods , proerties? advice or sample codes welcome. thank in advance.
thank both kind responses. link given @ekkehard.horner worked. save day.
the working codes now:
$credential = "...", "...", "...", "..." [system.__comobject].invokemember("logon", [system.reflection.bindingflags]::invokemethod, $null, $netiqobj, $credential)
Comments
Post a Comment