Running Powershell through NCPA
Posted: Mon May 24, 2021 7:21 am
Hi
I am trying to run a powershell through NCPA.
The powershell is using the powercli to query a vcentre and get some metrics.
Running it by hand works fine. I've commented out the original ps1 and enabled the one with sysnative as the VMWare commandlets are 64bit so I need the 64bit version of powershell.
I enabled debug on the logs and it shows "running process with command line 'c:\windows\sysnative\windowspowershell\1.0\powershell.exe -ExecutionPolicy etc etc etc...
If I copy/paste that command and run in in dos it works fine, as long as I run it from within the NCPA folder and the path is set to be just plugin\VMConsolidateCheck.ps1
When I run it from the browser, it just times out after 60 seconds.
Any help would be appreciated here.
rgds
George
I am trying to run a powershell through NCPA.
The powershell is using the powercli to query a vcentre and get some metrics.
Running it by hand works fine. I've commented out the original ps1 and enabled the one with sysnative as the VMWare commandlets are 64bit so I need the 64bit version of powershell.
I enabled debug on the logs and it shows "running process with command line 'c:\windows\sysnative\windowspowershell\1.0\powershell.exe -ExecutionPolicy etc etc etc...
If I copy/paste that command and run in in dos it works fine, as long as I run it from within the NCPA folder and the path is set to be just plugin\VMConsolidateCheck.ps1
When I run it from the browser, it just times out after 60 seconds.
Any help would be appreciated here.
rgds
George