ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

How to run vCheck – to get you started

By Vladan SEGET | Last Updated: December 17, 2020

Shares

vCheck is a community project started few years back by Alan Renouf. Since then it has been enhanced and updated several times, with the latest version 6 of the script recently enhanced and shared now at GitHub where the collaborative environment can be leveraged for further improvements.

So How to run vCheck? There is possibility to run vCheck directly by executing the powershell script, or you can make the execution via scheduled task. The scheduled task might be tricky to make it works, but once done you'll be just receiving the daily report via e-mail.

PowerCLI vCheckHow to run vCheck interactively

  • Download the latest PowerCLI from VMware website.
  • Download PowerShell 3.0 from Microsoft (should work), if not use PowerShell 2.0
  • Run the PowerCLI from start menu and connect to your vCenter server (or host, if you don't have vCenter in your environment) by using the command Connect-VIServer
  • Run the …    .\vCheck.ps1  from within your PowerCLI window and follow the assistant to configure how the script will run for the first time. The second time you run the script there isn't any input necessary. I've embedded a video from Alan Renouf at the end of this post, so you can follow….

How to run vCheck as a Scheduled task

Create a batch file – which will be saved as *.cmd

To run vCheck as scheduled task, there is a long command line a to pass. It looks like this. To make it work, just test it through the DOS window:

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile “C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ ” &  “C:\Scripts\MyScript.ps1″

Note that if you get an error saying that:

Windows PowerShell console file “”C:\Program” extension is not psc1. Windows PowerShell console file extension must be psc1

You may need to adjust the script, as in some environments there seems to be issues, like you can note that by adding an additional “quote” before the & migh help…

Alternatively, go directly to the Task Scheduler

Run vCheck for VMware vSphere in Windows Server Task Scheduler

On the ‘Actions’ tab select the action ‘Start a program’

The Program/script is (no quotes):

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

The ‘Add arguments (optional)’ box contains:

-psconsolefile “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ -file C:\Scripts\vCheck.ps1 vcenter.testing.local

The ‘Start in’ box is blank.

Quick Tip:

If you're not sure which version of PowerCLI you're running, just quickly enter Get-PowerCLIVersion

Which PowerCli Version Am I running?

Bonus:

  • PowerCLI poster can be found on https://vmware.com/go/powercli.
  • More Free tools and posters – check out our Free VMware Tools page

Video done by Alan Renouf:


Sources:

  • Dimitry Sotnikov
  • Alan Renouf – vCheck Daily Report
  • VMware Forums
Shares
5/5 - (1 vote)

| Filed Under: Free Stuff Tagged With: PowerCLI, vCheck as scheduled task

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Comments

  1. Paul Crane says

    November 13, 2014 at 5:06 pm

    This scheduled tasked worked for me on Windows Server 2008 R2

    Program\Script:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

    Add arguments (optional):
    -psc “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ -noe -c “.\”C:\vcheck\vcheck.ps1\””

  2. Javed says

    August 27, 2015 at 10:45 pm

    vcheck 6.15 script is working fine on windows 2008 R2. But when i run this script on Windows 2012 it gives me this error

    “Connect-VIServer : The term ‘Connect-VIServer’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At D:\vCenter_Check0.1\Plugins\00 Connection Plugin for vCenter.ps1:26 char:17
    + $VIConnection = Connect-VIServer $VIServer –user “xyz.com\testuser” – …
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Connect-VIServer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException”

    Some have seen this issues on Windsows 2012

  3. Fletcher Cocquyt says

    January 22, 2017 at 10:25 pm

    Just had a coworker want to run my deployVM PowerCLI script – he’s on a MAC, so I upgrade the shared windows server from 5.5 (where my scheduled vchecks reports run daily) to 6.x powercli

    Now I am looking for advice how to update my windoze scheduled job command lines:

    Old 5.5:
    powershell.exe -PSConsoleFile “c:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1” -file “e:\vmware\vCheck-snapreport\vcheck.ps1”

    New 6.x: ?

    I am getting the error:

    E:\vmware\vCheck-snapreport>e:\vmware\vCheck-snapreport\vcheck.ps1
    PS E:\vmware\vCheck-snapreport> .\runvcheck-new.bat

    E:\vmware\vCheck-snapreport>REM powershell.exe -PSConsoleFile “c:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1” -file “e:\vmware\vCheck-snapreport\vcheck.ps1”

    E:\vmware\vCheck-snapreport>REM upgraded to PowerCLI 6.5 – simpler syntax

    E:\vmware\vCheck-snapreport>REM C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c “. \”C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1\” $true” -file e:\vmware\vCheck-snapreport\vcheck.ps1

    E:\vmware\vCheck-snapreport>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe e:\vmware\vCheck-snapreport\vcheck.ps1

    Begin Plugin Processing
    [10:22:53] ..start calculating Connection settings for vCenter by Alan Renouf v1.7 [1 of 13]
    [10:22:53] Connecting to VI Server: cdgparpr01vcn55.cdg.ssnsgs.net
    Connect-VIServer : The term ‘Connect-VIServer’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At E:\vmware\vCheck-snapreport\Plugins\00 Initialize\00 Connection Plugin for CDGPR01.ps1:66 char:18
    + $VIConnection = Connect-VIServer -Server $VIServer -Port $Port
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Connect-VIServer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    E:\vmware\vCheck-snapreport\Plugins\00 Initialize\00 Connection Plugin for CDGPR01.ps1 : Unable to connect to vCenter, please ensure you have altered the vCenter server address correctly. To specify a username and password edit the connection string in the file $GlobalVariables
    At E:\vmware\vCheck-snapreport\vcheck.ps1:670 char:54
    + $TTR = [math]::round((Measure-Command {$Details = . $_.FullName}).TotalSecond …
    + ~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,00 Connection Plugin for CDGPR01.ps1

    [10:22:53] Adding Custom properties
    New-VIProperty : The term ‘New-VIProperty’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At E:\vmware\vCheck-snapreport\Plugins\00 Initialize\00 Connection Plugin for CDGPR01.ps1:102 char:1
    + New-VIProperty -Name LastPoweredOffDate -ObjectType VirtualMachine -Value {(Get- …
    + ~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (New-VIProperty:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    New-VIProperty : The term ‘New-VIProperty’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At E:\vmware\vCheck-snapreport\Plugins\00 Initialize\00 Connection Plugin for CDGPR01.ps1:103 char:1
    + New-VIProperty -Name LastPoweredOnDate -ObjectType VirtualMachine -Value {(Get-V …
    + ~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (New-VIProperty:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    New-VIProperty : The term ‘New-VIProperty’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At E:\vmware\vCheck-snapreport\Plugins\00 Initialize\00 Connection Plugin for CDGPR01.ps1:105 char:1
    + New-VIProperty -Name PercentFree -ObjectType Datastore -Value {
    + ~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (New-VIProperty:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    any advice?

  4. Srikanth says

    August 3, 2017 at 3:30 pm

    Can you advise how we can run vCheck on Multiple vcenters and getting these reports on a Single email?

  5. Avi Benemanuel says

    August 8, 2017 at 2:20 pm

    update for those who find this page and the task scheduler doesn’t work for them.
    this is what I did to get things working
    1. edit Plugins\00 Initialize\00 Connection Plugin for vCenter.ps1
    added before # Adding PowerCLI core snapin (which for some reason didn’t work)
    if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) {
    . “C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1”
    }
    2. task changed to
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe “vCheck-vSphere-master\vCheck-vSphere-master\vcheck.ps1”
    3. recreated the credential file
    New-VICredentialStoreItem -Host -user -Password -File “vCheck-vSphere-master\vCheck-vSphere-master\Windowscreds.xml”

  6. Tom says

    October 19, 2017 at 11:18 pm

    This looks amazing? Is there any risk to running this on a large environment (80 Hosts, 500VMs)? It only PULLS information, correct? Doesn’t try to change anything?

    Thanks

    • Vladan SEGET says

      October 20, 2017 at 6:23 am

      Hi Tom, the only risk is that the script will take a long time to run. -:) Yes, only reads values.

  7. Ramesh Badam says

    March 13, 2020 at 11:04 pm

    Hi Alan, Frederic,
    I have enabled ‘VMKernel warnings’ plugin and renamed the PS script file as well however I did not get the report output. Could you please advise how to enable this to get a report

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Veeam Backup & Replication v13 Beta: A Game-Changer with Linux
  • What is Veeam Data Cloud Vault and how it can help SMBs
  • Nakivo Backup and Replication – Malware Scan Feature
  • Zerto 10 U7 released with VMware NSX 4.2 Support
  • XorMon NG 1.9.0 Infrastructure Monitoring – now also with Veeam Backup Support
  • Heartbeat vs Node Majority StarWind VSAN Failover Strategy
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in