Macro doesn't return errors though it does not seem to effective at the moment. Any help much appreciated.
EDIT:
Turns out this is completely redundant as there's a way to achieve the same in System Preferences. Should have just looked better before doing all the research! I suspect the scripts didn't work because System Preferences was taking priority in setting the power modes, thus ignoring the shell commands. I'd still be curios to know the reason!
I suspect your script was working, but System Preferences isn't reflecting the "new reality" -- if, instead, you look at "Power" section of System Information you'll see lowpowermode updating when your macro runs.
You're on AC power ("Charging: Yes") and running in LowPowerMode (AC section's LowPowerMode is not 0). When you unplug you'll remain in low power mode (Battery section's lowpowermode = 1).
Different hardware has different capabilities (see yours with pmset -g cap) -- I'm guessing that's why you have "lowpowermode: 2" available on your machine, while trying it on mine returns an error.