I have "borrowed" my first script, thanks Rob, and started to learn how to do things the easy way. This script counts the number of cycles on the battery. My issue is that the script runs on MBPs that are on network segments pointing to a secondary server after syncing to the master:
Downloading http://macserverwc02.school.org:80/CasperShare/Scripts//battery.cs...
Running Script battery.cs...
Script Exit Code:0
Script Result: <result>31</result>
but for machines on the segments pointing to the master the script is failing with:
Downloading http://macserverwc01.school.org:80/CasperShare/Scripts//battery.cs...
Error: The script could not be found on the server.
What am I missing?