Hey Everyone,
I've created a few extension attributes to check for the presence of virtual machines on a computer. One is the "VMware - Virtual Machine List" extension created from the Casper template while the others are simple "if, then" statements checking for files with a .vmx extension (see below for an example). The "VMware - Virtual Machine List" extension only populates if the user manually checks in with Casper via Self Service. The other extension attributes seem to populate at random. Sometimes showing the result value and other times not. All computers are checking in as expected. Basically it seems like the result values are being purged but I'm not sure why. Is there a default cycle time for these values? Also, shouldn't the VM list populate without manually running a check in? Any ideas?
#!/bin/sh
set -e
#script to check for presence of virtual machines on a computer
#script is written for a Casper extension attribute
#check in the default vm folder for files with ".vmwarevms" file extension and pass into "vm" variable
vm=$(find ~/Documents/Virtual Machines.localized ( -name "*.vmx" ))
if [ -z "$vm" ]; then
#if the "vm" variable is null return "UNDEFINED"
echo "<result>UNDEFINED</result>"
else
#if the "vm" variable is not null return "VM"
echo "<result>VM</result>"
fi