Hi Luc,
Good morning
I thought of adding vmware tools functinality snippet to our main html script which we discussed yestaerday .
i think we can add orange code to do so (this is what you provided few days back) .since it will update during next powercycle it wont cause any isueswith vm (or any network disconnection)??
can you suggest on this??
$vms_tools_upgrade_needed=$vms | Where-Object {$_.Guest.GuestFamily -eq 'windowsGuest' -and $_.ExtensionData.guest.toolsversionstatus -eq 'guesttoolsneedupgrade'}
$do = New-Object -TypeName VMware.Vim.VirtualMachineConfigSpec
$do.Tools = New-Object VMware.Vim.ToolsConfigInfo
$do.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle"
Get-VM $vms_tools_upgrade_needed |
ForEach-Object -Process {
$_.ExtensionData.ReconfigVM_Task($do)
}
$fragments += $vms | Where-Object {$_.Guest.GuestFamily -eq 'windowsGuest' -and $_.ExtensionData.guest.toolsversionstatus -eq 'guesttoolsneedupgrade'}|
select name|
ConvertTo-Html -Property Name -Fragment -PreContent '<h2>WINDOWS_VM_TOOLS_NEED_UPGRADE</h2>' |
Out-String
That looks ok.
The only small improvement I can suggest is to not calculate the VMs twice.
The 2nd part could be
select name |
ConvertTo-Html -Property Name -Fragment -PreContent '<h2>WINDOWS_VM_TOOLS_NEED_UPGRADE</h2>' |
Out-String
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That looks ok.
The only small improvement I can suggest is to not calculate the VMs twice.
The 2nd part could be
select name |
ConvertTo-Html -Property Name -Fragment -PreContent '<h2>WINDOWS_VM_TOOLS_NEED_UPGRADE</h2>' |
Out-String
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thnaks.I am going to change that .
also .
yesterday i uploaded the 1.0 version to github.
https://github.com/jai-2018/vsphere-health-check
can you please tell me what steps will you follow to make changes to version 1.0 (yesterday's version)?
You mean changes to the code or how to use git to make changes?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
how to use git to make changes .i can make changes to code and upload my file again .(i think this is what i need to do )
but if you(or other contributor ) want sto make changes what needs to be followed.
There are many blog posts on how to contribute to a github project.
I find this one (The beginner's guide to contributing to a GitHub project) concise and not too technical.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thnaksLuc.