I am having the same issue as another user posted here: http://communities.vmware.com/docs/DOC-7430
I have the connect-viserver line in the script, and it runs perfectly as a scheduled task when I am logged into the server. When I am not, the script runs and outputs a new html file, but the fields inside are all blank. Any ideas?
"Mar 23, 2009 8:54 AM Reply <!-- <a href="/people/sfortuna74"
title="Click to view sfortuna74's profile"
src="/people/sfortuna74/avatar/16.png?a=-1"
border="0" height="16" width="16"
title="Click to view sfortuna74's profile"
alt="Click to view sfortuna74's profile"></a>
-->sfortuna74 says:
Hi -
We have recently started using this script and found it to be more helpful than we could have imagined. We are having one problem, however, which I hope you can help us with. We can only get the script to run when we are logged into the server. When the script is set to run as a scheduled task, we get the email report, however all the fields are empty. I then mofified our batch file to write to an error log, via "2>&1 > error.log" and the output I see when the script attempts to run as a scheduled task is as follows -
You are not currently connected to any servers. Please connect first using Connect-V
IServer
Might you be able to help us understand what we need to do to make this error go away?
Thank you very much for sharing the script and for your time -"