Elevated privileges


Hi all,

I’ve wrote a powershell script which need administrator’s privileges to successfully run a Get-ClusterNode command. So i don’t know how to do it.

I have tried this:

[/settings/external scripts/scripts/check_as_user] check_hyperv_vm_load = cmd /c echo scripts\check_hyperv_vm_load.ps1; exit($lastexitcode) | powershell.exe -command - user = administrator password = My_Plain_Text_Password

But i have this error:

Unknown command(s): check_hyperv_vm_load

I have a workaround but i don’t like it. I run NSclient++ service as “administrator” instead of “Local System”.

So, i have 2 questions:

  • without change service user, how can i configure NSClient.ini to run a script as administrator ?
  • Can i use a crypted password ?

Many thanks for help.