Closed santoshchowdary07 closed 8 years ago
Have you tried running Powershell as the user that is running the task, and reunning vCheck? 99% of these issues are because the script is prompting for something.
When I try to run the script manually in powershell it's promting me to enter credentials. I beleive thats the reason why my scheduled task never gave any output. Is there anyway that I can have powershell to run the script without prompting for credentials?
Have you entered the credentials once? It _should _create a credentials file which will then be used after the first run. I don't use this, I just configure your vCenter so credentials are passed through correctly.
I know that I had to tweak the arguments section somewhat to call the Console File correctly (which loads the Snapins). The following is what I have been using with success: Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Arguments: -command ". 'C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1'; C:\Scripts\vCheck-vSphere-master\vCheck.ps1"
Aside from that: Can you provide a screenshot of the General screen on the Scheduled Task in question? Specifically, the user the script is running under. Also include what user you configured/tested the script with originally. Are you on a domain?
Closing this off as it is quite old. New schedule functions should help with this as well f2014ce986cf71b28ea59aa1615d600872839089
I am trying to run vCheck as scheduled task. I have created the task in the scheduler to run daily. The task gets started and shows as running and never gives the output. I had to forcefully end the task after 4 or 5 hours. Below is how my action window looks in the task scheduler.