Hi All,
Im trying to run the vCheck health report but its throwing an error every time. Also, can we restrict to few report like vCenter,Data store, VM and Host etc...
S D:\vmk\vcheck> .\vCheck.ps1
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run D:\vmk\vcheck\Styles\Clarity\Style.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
WARNING:
WARNING: Welcome to vCheck by Virtu-Al http://virtu-al.net
WARNING: =================================================
WARNING: This is the first time you have run this script or you have re-enabled the setup wizard.
WARNING:
WARNING: To re-run this wizard in the future please use vCheck.ps1 -Config
WARNING: To get usage information, please use Get-Help vCheck.ps1
WARNING:
WARNING: Please complete the following questions or hit Enter to accept the current setting
WARNING: After completing this wizard the vCheck report will be displayed on the screen.
WARNING:
WARNING:
Begin Plugin Processing
[17:57:32] ..start calculating Connection settings for vCenter by Alan Renouf v1.20 [1 of 116]
Connect-VIServer : 12/26/2019 5:57:35 PM Connect-VIServer Could not resolve the requested VC serve
r.
Additional Information: There was no endpoint listening at https://vcsa.local.lab/sdk that could accept the message.
This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
At D:\vmk\vcheck\Plugins\00 Initialize\00 Connection Plugin for vCenter.ps1:151 char:20
+ $VIConnection = Connect-VIServer -Server $VIServer -Port $Port
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Connect-VIServer], ViServerConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameResolutionFailure,VMware.VimAutomation.Vi
Core.Cmdlets.Commands.ConnectVIServer
D:\vmk\vcheck\Plugins\00 Initialize\00 Connection Plugin for vCenter.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 D:\vmk\vcheck\vCheck.ps1:896 char:56
+ ... = [math]::round((Measure-Command { $Details = @(. $_.FullName)}).Tota ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,00 Connection Plugin for vCenter.ps1
Thanks
vmk
No, not really.
This thread seems to be going on forever
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Looks like vCheck can't resolve the name of the VCSA?
Is DNS resolution working from the station where you launch the script?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
You are right, it seems but i cant find option to change the VCSA name in the script because there are multiple files. Do you have any idea which file need to edit and change VCSA name.
thanks
vmk
Have a look at Re: run vCheck for mutliple VC
I explained where to define the vCenter (plugin00) and how to run against multiple vCenters (if needed).
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
I have changed the vcenter name in connection plugin but still throws an error. Can you share connection plugin format for Vc ?
What exactly did you change in plugin00 ?
On line 11 you should update the value assigned to the variable $Server
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Thanks for your response, i appreciate it. Yes, line 11, i entered VC server name.
Also, where the out will generate ? which folder.
Where i need to edit for sending mailto ?
Last can we shorten the report ?
Kindly help me.
The output is stored in $env:TEMP.
But you can select another location with the -OutputPath parameter.
The mail settings are defined in the file GlobalVariables.ps1.
Which you can edit manually or interactively when you run vCheck.ps1 for the 1st time or with the -Config switch.
The amount of output is controlled by the plugins you select.
The Select-Plugins.ps1 script is one way of selecting the plugins.
Another way to select the plugins which should run is through the XML file you pass on the -Job parameter.
Not sure why the Connect-VIServer does not work for you.
I assume you see the VCSA name you updated in the error message?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Script its running with error
$env:TEMP - you mean output will be in temp location ?
GlobalVariables.ps1. - I was able to trace and done changes for mail settings.
select another location with the -OutputPath parameter. - Can you help me ? Where i need to do changes and which file.
Suppose, i don't need powered-off VM's status,VMware tools, EVC mismatch and many others because it taking time to generate output. How to avoid or skip the report which i don't need actually. which i file need to edit to skip example - powered-off VM's status,VMware tools, EVC mismatch.
I have 42 VC and many are in remote sites which are not in Vrops, hence wanted to monitor. Kindly help me to execute successfully.
Appreciate your help.
Thanks
vmk
Yes, the Temp folder for the account that is running the script.
You add the -OutputPath parameter, with a valid location, when you call vCheck.ps1.
.\vCheck.ps1 -OutputPath '.\MyFolder'
For the plugins you have two options:
Your issue with the vCenter is something I can't fix from here.
You are apparently using a vCenter FQDN that can't be resolved by the Connect-VIServer.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
I will check your recommendations and get back but its seems vcheck report completed but i cant see any output file name ? What will be the name of report in temp folder ?
Thanks
vmk
There should be a file with a name like "<VIServerName>_vCheck_<yyyyMMdd_HHmm>.htm" in the folder from $OutputPath.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok never mind. I did executed the script again output folder and using
.\vCheck.ps1 -OutputPath 'D:\MyFolder'
Hope this time it generate the report. But i'm unable to find the plugin.xml file and this is best option. can you please help on this ? However, i ran the plugin using 1st option and i was unable to enable/disable. Thank you again. Let see if this time it works.
Even, i have enabled the mail to but not receiving any mail for report.
Thanks
vmk
.\vCheck.ps1 -OutputPath 'D:\MyFolder'
Not sure what you mean by the plugin.xml file?
You can create a job.xml file, in which you can specify which plugins shall run.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
ok vc1.xml i did created with help of your template. How about the connection plugin ? I see some line is missing in screeshot, will it work ? It's seems i'm able to closer to getting the report.
Thanks
vmk
If you mean the line with the Get-vCheckSetting call, that was something that was added in a later version of vCheck.
My screenshot was made in 2016.
You have to use the current layout of plugin00 of course.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
You meant to say that i don't have use now ? I need to stick with Get-vCheckSetting given
Also, i forgot to ask earlier one question. Do i need to disable the plugin every time whenever i run the vcheck.ps1 using below Cli ?
Run .\Select-Plugins.ps1. It will ask for each plugin if you want to have it enabled or not.
Thanks
vmk
You use the one that comes with the vCheck distribution as a template.
But you make the changes (content and filename) as I showed in the other thread.
Then in your .xml file, you point to the plgins you want to use.
For plugin00 that would mean the new filename you have given it.
And no, if you go for the .xml file, you explictely name the plugins you want to use.
Then you do not need to use Select-Plugins.ps1.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Sorry, i'm unable to understand. My accept my apologies for asking again. I think, i mixed up with 2 questions.
Since, i'm planning to use task scheduler, hence please let me know
Then in your .xml file, you point to the plugins you want to use.- How to define ?
For plugin00 that would mean the new filename you have given it.- is it same you are referring above ?
And no, if you go for the .xml file, you explicitly name the plugins you want to use. - How to explicitly define ?
Last, i was able to generate report this time. thank you.
thanks
vmk
LucD,
You mean to say use below format and run the commmand - .\vCheck.ps1 -job job.xml -Outputpath D:\My Folder ? Please confirm
<vCheck>
<globalVariables>GlobalVariables.ps1</globalVariables>
<plugins path="plugins-vSphere">
<plugin>00 Connection Plugin for vCenter.ps1</plugin>
<plugin>03 Datastore Information.ps1</plugin>
<plugin>11 VMs with over CPU Count LOL WRONG PATH.ps1</plugin>
<plugin>99 VeryLastPlugin Used to Disconnect.ps1</plugin>
</plugins>
</vCheck>
2) But each time its prompting to give input Example - R or D input. how to avoid or skip this ? And its keep prompting me in the middle of job to press D/R/S.
3) How i can run for multiple VC ?
4) I'm looking for report in mail box. Do i need to set the variable in $global variable to $true ?
thanks
vmk