One of the most popular scripts on my site with 26,966 downloads of v5 has been the vCheck script, for those of you who haven’t seen this yet here is a quick summary of this script:
Summary
vCheck is a vCenter checking script, the script is designed to run as a scheduled task before you get into the office to present you with key information via an email directly to your inbox in a nice easily readable format.
This script picks on the key known issues and potential issues of the virtual infrastructure and reports it all in one place so all you do in the morning is check your email.
One of they key things about this report is if there is no issue in a particular place you will not receive that section in the email, for example if there are no datastores with less than 5% free space (configurable) then the disk space section will not show in the email, this ensures that you have only the information you need in front of you when you get into the office.
This script is not to be confused with an Audit script, I don’t want to remind you that you have 5 hosts and what there names are and how many CPU’s they have each and every day as you don’t want to read that kind of information unless you need it, this script will only tell you about problem areas with your infrastructure.
So What’s new in 6.0
vCheck 6.0 has been updated to be more community driven and easier to expand, the checks have been removed and put into separate plugins which make it easier for people to contribute. Make sure you check out the plugins page for a list of the plugins and what they check for.
The HTML output has been reformatted to work with newer versions of Outlook. (Lots of previous comments on this!)
A Setup Wizard has been added for easy setup and no more need to reference the vCenter address as a parameter of the script.
As the plugins have been moved out it makes this HTML report framework easy to adapt to other PowerShell enabled products like
- VMware vCD (Already started this one)
- Sharepoint
- Exchange
- vShield
- VMware View
- SQL
- Active Directory
- and more.
Please contact me if your interested to start your own using this template.
A header image has been added to the HTML report to make the report more customizable..
And much much more including lots of speed enhancements.
Big Thanks
Lastly I want to add a big thanks to everyone who has ever run this script and continues to use it, I hope you will find this version as useful as the previous versions. Thanks to the Beta testers, I couldn’t have done it without you, you all came up with some great ideas and additions which made it hard for me to finish developing and releasing – I think I have enough for v7 !
And lastly thanks to anyone who writes a plugin themselves and sends it through to me to include on the plugins page. Keep an eye out soon for some information on how you can easily add new plugins and check your current plugins.
Download
As always, please head over the the vCheck page on this site to download the script.
Anyone know how to edit the script to send an email to office 365 ?
What exactly did you readd? was it just readd or replace also?
Pingback: Finding your way in the PowerCLI Community |
I thought there used to be an output to folder/file share option, cannot seem to find it can you help me ? out-file ….
Hi Alan,
I am facing challenge in configuring the Vcheck-6. It is not able to connect to Vcentre. I have seen there is no option for providing user-id & password in script. So can you provide me some help in this area.
Thanks for your support in advance.
Pingback: Finding your way in the PowerCLI Community - JO duMonT
Pingback: Finding your way in the PowerCLI Community | JO duMonT
Pingback: vCloud Director PAY-AS-GO vCPU default setting – Gotcha : Virtual-Blog.com test site
Hello,
I have been using vCheck for a while and it is a great tool. I’m now running version 6 and would like to know if it is possible to output the results of the report to a .csv file.
Any help appreciated.
Pingback: Clearing up an AD Lightweight Directory Service error on vCenter Server systems « Dennis Bray's Virtual Place
Pingback: vCheck Script | Electric Monk
I have looked thru the script and it appears vcheck6 only takes one of two arguments (using a switch statement), either interactive configuration or the name/path of an html output file. I have two vsphere servers and would like to run the script the “old” way where my scheduled task puts the vsphere server as the argument within each scheduled task.
Are there any plans to add back the server as an argument to the script? I know I can re-work the code, duplicate the script, etc to make it work but was interested if this simplicity could be added back to the next revision.
Thanks,
Sean
Hi, great tool ! thank you for all the effort you have put into this. Is there a way I can just target a single Datacenter – we have six and I’m only interested in the results from one for the moment. thanks
Is it possible to get the list of Orphaned vmdk or can we modify vCheck script to list out Orphaned or zombie vmdk file with path in the data store. Thanks !!
Thanks
vmguy
http://communities.vmware.com/thread/398036?tstart=0
Pingback: vCheck6 Utility Commands « Geek after Five
Do we need to run the setup again or keep the GlobalVariables.ps1 as is. Also has the email in vcheck 6.0 When Sending the email we get the follow error
send-mailmessag : MailBox unavailable. The server respone was: 5.7.1 Client dies bit have permissions to send as this sender.
To solve this in 6.0 we had to readd the OLD String from Vcheck5
———– vCheck 6.10 Released ———–
I am so glad that I stumbled upon this site. Outstanding information! I am so excited to start my new vmware training bootcamp this month athttp://www.globalittraining.net/vmware-training. I will keep checking back for updates. Thanks!
Great script, I am working my way through it but have a couple of issues.
First, I went through and set my security policy to RemoteSigned but it said the script wasn’t signed. I had to set my script policy to unrestricted to get this to run.
Second, everytime I run the script I get a Security Warning on every single plugin that I have to set to Run Once. Is there an option for run always or how can I fix this?
Great job on this though, I am liking what I see!
For the email attachment I fixedit by adding the following line in the vCheck.ps1 script.
Between line 370 and 371 add the following:
$SendAsAttachment = $SendAttachment
Seems there may be some variable confusion. this is working for me.
To Send the Email we added the OLD String from Vcheck5 and it worked
function Send-SMTPmail($to, $from, $subject, $smtpserver, $body) {
$mailer = new-object Net.Mail.SMTPclient($smtpserver)
$msg = new-object Net.Mail.MailMessage($from,$to,$subject,$body)
$msg.IsBodyHTML = $true
$mailer.send($msg)
}
if ($SendEmail) {
Write-CustomOut “..Sending Email”
send-SMTPmail $EmailTo $EmailFrom “$VIServer vCheck Report” $SMTPSRV $MyReport
}
Thanks for the new version! I have it running as scheduled task and already have seen its value several times over!
I am having one issue, however… I’m also having issue with % READY not showing on the report. I have tried multiple settings to see if the value is blocking, etc…
When Sending the email we get the follow error
send-mailmessag : MailBox unavailable. The server respone was: 5.7.1 Client dies bit have permissions to send as this sender.
We have been using Vcheck5 on the same server without any issue. Also when will the updated version be avaiable
Thanks for all the comments I have fixed most of these issues in the next version which I will upload soon.
@Greg Crawford – Check out RVTools; it’s great. It’ll show you all your zombie vmdks (although make sure you check twice before deleting!). It’s not 100% perfect and it won’t tell you about folders without vmdks but at least it’ll give you a great place to start.
Hi Alan, is it possible du specified a cluster for vCheck v6? Because we have here > 10 DCs and more than 30 Clusters.
Map Disk Region Event reporting doesn’t find anything. (we use Thin provisioned disks and Netbackup vStorage API backups.. tons of those events generated, but report shows nothing.)
Also in the VCB garbage plugin if you add: NBU_SNAPSHOT in the search for string options it should find any Netbackup generated snapshots.
Alan, I just downloaded your vCheck script and it’s function is amazing. I’m very new to the powershell/vcli/powervcli side of the house, but I have one question I was wondering if you could give some input on. I’m looking for a way to identify orphaned folders on datastores. The “VM’s in Inconsistent folders” plugin shows mixmatched names, but is there a way to generate a list of vm’ files on the datastores that do not actually have a VM attached to them? I think this would provide tremendous benefit for those times that have had someone remove a vm from inventory but didn’t actually delete the vmware files associated it it. Thanks in advance!
How can I get the creator information added to the snapshot plug in ?
Pingback: Open Tabs–Week ending 2/17/2012
Great script!
One question I have is %RDY does not appear to be working properly. I have more than a few machines that are seeing huge Ready Times, but they do no appear in the report. I have also tried to lower the setting to 0% which should list all the VMs in the report, but I still get 0.
Ideas?
Thanks Alan!
I guess you already noticed… but the “stringvariable issue” is present in more plugin Modules…
like in: 11 VMs with over CPU Count
$vCPU=1 -> $vCPU=”1″
Jacob, Thanks spotted an error when sending as an attachment, fixed the code for next release.
Fred, just fixed the HWVersion, thanks. Will be part of next release.
Adam, Right click the Zip file before unzipping it and Select properties, then it the Unblock button.
Any idea why if I have Set-ExecutionPolicy set to Bypass, vCheck runs through but then fails on e-mail send? If I use Set-ExecutionPolicy Unrestricted and hit “R” for all the plugins, it ends up working fine.
I’m a pCLI newb so I apologize if this is a simple answer.
When I run the vCheck with the initial config or with the -config switch, it completes fine and sends an email. However, if I run it without the config switch, or through the scheduled task it fails with this error:
Send-MailMessage : Cannot validate argument on parameter ‘Attachments’. The argument is null or empty. Supply an argume
nt that is not null or empty and then try the command again.
At C:\scripts\vcheck6\vCheck.ps1:385 char:154
+ send-Mailmessage -To $EmailTo -From $EmailFrom -Subject “$VISRV vCheck Report” -SmtpServer $SMTPSRV -Body “v
Check attached to this email” -Attachments <<<< $Filename
+ CategoryInfo : InvalidData: (:) [Send-MailMessage], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.SendMailMessage
Any ideas what might be causing this to work fine with the -config switch but fail otherwise?
The problem seems to be in $HWVersion (must be a string variable)
$HWVersion =8 modified in $HWVersion =”8″
Fred, Thanks, I will check this.
Great Job!
hardware version check does not seem to work —> no output at all
Pingback: vCheck v6 has been released | ESX Virtualization
Outstanding, thanks for the valuable service!
Another small change in 03 Datastore Information.ps1 to get header information:
Old:
$Header = “Datastores (Less than $DatastoreSpace% Free) : $($OutputDatastores.count)”
New:
$Header = “Datastores (Less than $DatastoreSpace% Free) : $(@($OutputDatastores).count)”
BTW is there any way to get e.g. the output of diff to you? I have made these changes in multiple files
Great job, as always!
With the plugins as distributed, I am missing header information e.g.
Snapshots (Over Days Old) :
I rearranged the plugin to get:
Snapshots (Over 14 Days Old) : 1
This is the modification:
# Start of Settings
# Set the warning threshold for snapshots in days old
$SnapshotAge =14
# End of Settings
$Snapshots = @($VM | Get-Snapshot | Where {$_.Created -lt (($Date).AddDays(-$SnapshotAge))} | Select Created, VM, Name, Description, SizeMB)
$Title = "Snapshot Information"
$Header = "Snapshots (Over $SnapshotAge Days Old) : $($snapshots.count)"
$Comments = "VMware snapshots which are kept for a long period of time may cause issues, filling up datastores and also may impact performance of the virtual machine."
$Display = "Table"
$Author = "Alan Renouf"
$Version = 1.0
$Snapshots
Pingback: vCheck 6.0 released
Pingback: vCheck 6.0 est disponible
@Phil Yes we’d offer that feature during beta, it’ll likely be available on later release (Alan have to keep some new features for v7 ^^)
An easy workaround is to add a vcentername parameter in PARAM{} definition
I’m glad to see that vCheck v6.0 is released. This is the most useful PowerCLI script there is. And I have used it daily since version 1.0.
I have to report on two vCenter servers, both on our WAN.
Can we still specify the server we connect to on the commandline?
If not, that would be a useful enhancement.
Congratulations on another great release of this very useful script that should be used by every vSphere admin (yes even the pearly ones 😉