Create object for a class in PowerShell script

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>), 
  1. Call static methods in the following way
    [namespacename.classname]::methode()
  2. 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.


    • Related Articles

    • No data for service and process in Windows server monitor

      If you see "No Data" for process and service metrics (such as CPU or memory usage of monitored services) in the Site24x7 Windows server monitor user interface, follow the troubleshooting steps below. Run PowerShell Commands Open PowerShell as ...
    • Why do I observe a spike in my website response time?

      Response time is a combination of DNS time, connection time, SSL Handshake time (for HTTPS) and download time. Spikes in response time could be due to increase in DNS time or connection time or download time. Some factors to consider: In case of ...
    • Roles supporting tunnel management and path data in VMware VeloCloud SD-WAN

      Introduction In VMware VeloCloud SD-WAN, the ability to create or modify tunnels and view path (tunnel) data depends on the user role. This ensures that configuration changes and diagnostic insights are restricted to authorized users. The table below ...
    • Troubleshoot the Unauthorized user (Error 401) when installing Tomcat plugins

      When installing Tomcat plugins, you may encounter the following error: Unauthorized user. Does not have permissions. HTTP Error 401: This error usually occurs when the user accessing the Tomcat Manager application does not have the necessary ...
    • Site24x7 Real User Monitoring (RUM) - Data Collection

      When you include Site24x7 RUM beacon script in your web pages, the following data is collected. All data that's being collected is in accordance with GDPR compliance. Performance details of web page load time - Metrics like response time of web page ...