alanrenouf / vCheck-vSphere

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

New Request- VMCI #196

Closed slaffoley closed 10 years ago

slaffoley commented 10 years ago

Hi I am looking for a check that checks the VMCI Setting in hardware. I'd like to see VM's that are set to unrestricted, We are looking to use Vshield for AV and need to ensure all machines are covered.

Would this be possible?

Thanks

Simon Laffoley

Sneddo commented 10 years ago

Give this a try, haven't had a chance to test it out properly, but should be what you are after. Just save it as a .ps1 file in the plugins directory.

# Start of Settings 
# End of Settings

$VMCIEnabled = $VM | Select Name,@{n="AllowUnrestrictedCommunication";e={($_.extensiondata.config.hardw
are.device | Where { $_.deviceinfo.label -eq "VMCI device" }).AllowUnrestrictedCommunication}} | Where { $_.AllowUnrestrictedCommunication}

$VMCIEnabled

$Title = "VMCI Enabled"
$Header = "VMs with VMCI enabled: $(VMCIEnabled)"
$Comments = ""
$Display = "Table"
$Author = "John Sneddon"
$PluginVersion = 1.0
$PluginCategory = "vSphere"
slaffoley commented 10 years ago

HI That worked a treat ! The only amendment I made was: $Header = "VMs with VMCI enabled: $(@($VMCIEnabled).Count)"

Thanks very much for the help - This will save a whole lot of time. Simon Laffoley