alanrenouf / vCheck-vSphere

vCheck Daily Report for vSphere
MIT License
735 stars 327 forks source link

Desired CBT monitor #333

Closed gulmiguel closed 9 years ago

gulmiguel commented 9 years ago

Hi Alan. First let me state how wonderful a product you have put out. I'm new to the whole PowerCLI/Powershell/Veeam arena so I'm not as adept yet in writing scripts. I hope to be one day - hopefully I can follow your path regardless of how long it takes.

Meanwhile, I've been trying to create a tabular report which outputs the advanced configuration parameters of a VM into a csv file. The specific parameter I'm trying to report on is whether or not the VM in question has Change Block Tracking enabled or not. I know in the Advanced section, the parameter is actually listed as ctkEnabled; which is next listing a logical field (TRUE/FALSE). Can you guide me in the proper way to include this in my reports; or can you add it to your wonderful vCheck program?

Many thanks, respectfully, Miguel

Sneddo commented 9 years ago

There is already a plugin for this: /Plugins/60 VM/620 CBT Status.ps1

If you want to report on all VMs, regardless of the setting, you could just remove the where clause: Where-object {$_.Config.ChangeTrackingEnabled -eq $CBTEnabled}

If you want a CSV, you can just pipe it out using Export-CSV.

Can I suggest if you have any trouble, that you post in the PowerCLI VMware communites forum: https://communities.vmware.com/community/vmtn/automationtools/powercli