Create object for my class in PowerShell script
Please follow the below steps to create an object in your Powershell script:
Using load file [Reflection.Assembly]::LoadFile(<Compleate Path of dll>),
- Call static methods in the following way
[namespacename.classname]::methode() - Call non-static methods by creating objects
$newobject = New-Object namespacename.classname
$newobject.methode()
Click here to view a sample plugin file using PowerShell script.