Hi Folks!
Upper management asked if I could create a script to manage the power settings for our iMacs. The built in config profile settings in the JSS don't seem to match and they couldn't get it to work to their specs. So I came up with a script to set the Energy Saver prefs in System Preferences the way they'd like them set for now. But having a little trouble. When I push it via Casper, sometimes it works and sometimes it doesn't. But when I run the script from the local machine, works every time. I was wondering if there needs to be a little more 'logic' to the script for it to work in a Casper policy. If anyone can see. Here's what I have scripted with screenshot of what they want:
#!/bin/bash
# Sets Turn Display Off after... Never
systemsetup -setsleep never
# Sets Prevent computer from sleeping automatically
systemsetup -setcomputersleep never
# Sets Put Hard Disks to Sleep when possible off
pmset -c disksleep 0
# Sets Wake for network acccess to on
systemsetup -setwakeonnetworkaccess on
# sets Startup automatically after a power failure
systemsetup -setrestartpowerfailure on
# turns off Power Nap in Energy Saver
pmset -c darkwakes 0
# Turns on the Schedule power on weekdays at 12am in Schedule button
pmset repeat wakeorpoweron weekdays 00:00:00
exit 0

