Go to All Forums

Running Plugins in Powershell 7 Natively

Currently scripts execute on Windows in Powershell 5.1.

Is it possible to execute in Powershell 7 natively? Fora few things, I have had to deploy a wrapper.

Like, install Powershell 7, edit a configuration file to use Powershell 7 and point the exe to execute?

Like (1) Reply
Replies (2)

Hi Dennis,
Yes, it is possible to execute plugins using PowerShell 7 natively.
 
To enable this, first ensure that the PowerShell 7 installation path is added to your system’s PATH environment variable.
 
Next, configure the agent to use PowerShell 7 by updating the .cfg file as shown below:
 
  1. [global_configurations]
  2. powershell_version=7

  3. [instance]
  4. host=localhost
 
Make sure that:
  • The global_configurations section is present.
  • At least one instance (like [instance]) is defined.
 With this setup, the agent will execute the plugin using PowerShell 7 instead of the default PowerShell 5.1, eliminating the need for a wrapper.

Regards,
The Site24x7 team


Like (0) Reply

Excellent, I will give this a try and report back.

Like (0) Reply

Was this post helpful?