4 Replies Latest reply on Apr 25, 2016 6:00 PM by munishpalmakhija

    Missing output for vCenter Settings, Datacenter Hosts and Virtual machines.

    vkaranam Hot Shot

      Hello Guys,

       

      I am running the Health check script on one of the vcenters and the HTML file was not being saved. I don't want to email the file so i commented out other steps and the HTML file was not being saved anywhere.

       

      here is my report file

       

      $dt = get-date -format yyyyMMdd

      D:\Scripts\VMwareHealthCheck\vmwarevSphereHealthCheck.pl --server xxxx --username xxxx --password xxxx  --type vcenter --report C:\scripts\vmware_health_check$dt.html -email no

      $pp = get-process perl

      $pp.waitforexit()

      $file = "D:\Scripts\vmware_health_check$dt.html"

      #$smtpServer = "YourEmailServerName"

      #$msg = new-object Net.Mail.MailMessage

      #$att = new-object Net.Mail.Attachment($file)

      #$smtp = new-object Net.Mail.SmtpClient($smtpServer)

      #$msg.From = "vmwarereport@yourcompany.com"

      #$msg.To.Add("yourname@yourcompany.com")

      #$msg.Subject = "Today's VMWare Health Report"

      #$msg.Body = "Enjoy from myvmland.com!"

      #$msg.Attachments.Add($att)

      #$smtp.Send($msg)

      #$att.Dispose()

      #Remove-Item C:\scripts\vmware_health_check$dt.html

       

      I am getting the following errors as well

       

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 5501.

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 5638.

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 554.

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 572.

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 574.

      print() on closed filehandle REPORT_OUTPUT at D:\scripts\VMwareHealthCheck\vmwar

      evSphereHealthCheck.pl line 4525.

       

      Let me know any questions

       

      Thanks in Advance

       

      Thanks

      vKar