Closed bopraji closed 10 years ago
Can you let us know what version of Powershell you are using: $host.version
Also, if you could provide the email section of your GlobalVariables.ps1 (feel free to replace the email recipient/domain).
Most of this is just noise, it looks like it doesn't like $EmailFrom or $EmailTo.
Hi Alan
Thanks for your reply.
Found the error after posting to the forum. There was a space in one of the email addresses that I missed.
Its working fine now.
Much appreciate your work on this.
Running on Windows 7 and using VMware vSphere PowerCLI!
PowerCLI C:\PSScripts> $psversiontable
Name Value
PSVersion 3.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.18444 BuildVersion 6.2.9200.16481 PSCompatibleVersions {1.0, 2.0, 3.0} PSRemotingProtocolVersion 2.2
Cheers
Hi Just downloaded vCheck and ran it. All good and reports our environment. But I get these errors when it tries to email the reports.. 0:54:26 a.m. ..Displaying HTML results 10:54:26 a.m. ..Sending Email New-Object : Exception calling ".ctor" with "2" argument(s): "The specified string is not in the form required for an e-mail address." At C:\PSScripts\vCheck-vSphere\vCheck.ps1:734 char:11
Property 'subject' cannot be found on this object; make sure it exists and is settable. At C:\PSScripts\vCheck-vSphere\vCheck.ps1:739 char:4
Property 'Body' cannot be found on this object; make sure it exists and is settable. At C:\PSScripts\vCheck-vSphere\vCheck.ps1:743 char:7
You cannot call a method on a null-valued expression. At C:\PSScripts\vCheck-vSphere\vCheck.ps1:745 char:7
Exception calling "Send" with "1" argument(s): "Value cannot be null. Parameter name: message" At C:\PSScripts\vCheck-vSphere\vCheck.ps1:767 char:4
You cannot call a method on a null-valued expression. At C:\PSScripts\vCheck-vSphere\vCheck.ps1:769 char:4
Am I missing something? The email addresses etc looks correct in the globalvariables file.
Cheers