Page 1 of 1

Running poweshell scripts as admin ?

Posted: Fri Mar 21, 2014 3:44 am
by eneait
Hi, i am having a problem getting some powershell script to work, i want to monitor windows 2012 NLB, so basically just run Get-NlbClusterNode from a powershell script to get the status of the NLB loadbalancing cluster.
But all i get is "Get-NlbClusterNode : Access denied"

i am running with the NRDS client.

is there any way to get the nrds client to excecute the script as admin ?

BR
Daniel

Re: Running poweshell scripts as admin ?

Posted: Fri Mar 21, 2014 11:24 am
by lmiltchev
Have you modified the config.ini file in any way? Do you still have the following line?

Code: Select all

ps1 = powershell -ExecutionPolicy Bypass -File $CHECK_COMMAND$
Note: It should be in: C:\Program Files\Nagios\NRDS_Win

You can try the following (I haven't tested it, so I am not sure it is going to work):

Open the "Task Scheduler", select the NRDS task, click on the "Action" menu and go to "Properties". Under the "General" tab, select the "Run with highest privileges" checkbox, and click "OK".

Hope this helps.