Hi,
While trying to schedule the script in win2k3, encountered the following error:
The Connect-VISERVER Cmdlet did not work, please check you VI Server.
When running the script manually it works fine. Followed virtu-al's link : http://www.virtu-al.net/2009/07/10/running-a-powercli-scheduled-task/ but this is all what i get. The command prompts opens, prompts for the credential and fails with the above error.
Any help will be appreciated.
Thanks,
A
Place Start-Transcript and Stop-Transcript cmdlets at the beginning and end of your script.
That can perhaps tell you what goes wrong.
Start-Transcript -path c:\Temp\log.txt .... # Your script .... Stop-Transcript
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc, performed the changes but dint get much:
Transcript started, output file is c:\tmp\log.txt
10:43:50 AM Connecting to VI Server
**********************
Windows PowerShell Transcript End
End time: 20101202104353
Earlier it was complaining about "The term 'param' is not recognized as the name of a cmdlet, function, script file, or operable program" so commented out the first line in the script : "param( $VISRV)".
Edit: Thanks Luc, got through it, script wasn't actually able to retrieve the value of the server so have to specify it literally. ($VISERVER=IP of the server).
Thanks,
A