About systemsetup in Remote Desktop
The command-line tool systemsetup
is installed with macOS and can be used to change client settings. Any command that includes systemsetup
will run in Remote Desktop using the Send UNIX Command task.
Find the command-line syntax, explanations, and example in the tool’s help prompt:
sudo systemsetup -help
Make sure you precede systemsetup
with sudo
.
A few of the capabilities of systemsetup
are listed below.
Flag | Description |
---|---|
-setallowpowerbuttontosleepcomputer (on | off) | Enables or disables the power button to put the computer to sleep. For example: systemsetup -setallowpowerbuttontosleepcomputer on |
-setdate mm:dd:yy | Sets the current month, day, and year. For example: systemsetup -setdate 04:09:13 |
-setlocalsubnetname name | Sets Local Hostname to systemsetup -setlocalsubnetname LabMac1 |
-setnetworktimeserver timeserver | Designates a network time server. Enter the IP address or DNS name for the network time server. For example: systemsetup -setnetworktimeserver time.apple.com |
-setremotelogin ( on | off ) | Sets remote login (SSH) to either on or off. Important: If you turn off remote login, you won’t be able to administer the computer using SSH for remote login. For example: systemsetup -setremotelogin on |
-setrestartfreeze ( on | off ) | Specifies whether the computer restarts automatically after the system freezes. For example: systemsetup -setrestartfreeze on |
-setrestartpowerfailure ( on | off ) | Specifies whether the computer automatically restarts after a power failure. For example: systemsetup -setrestartpowerfailure on |
-setsleep minutes | Sets amount of idle time until computer sleeps. Specify “Never” or “Off” for computers that should never sleep. If you set the system to sleep, you won’t be able to administer the computer remotely while it is sleeping. For example: systemsetup -setsleep 60 |
-settime hh:mm:ss | Sets the current time. The provided time argument should be in 24-hour format. For example: systemsetup -settime 16:20:00 |
-settimezone timezone | Sets the local time zone. Use -listtimezones to list valid time zone arguments. For example: systemsetup -settimezone US/Pacific |
-setusingnetworktime ( on | off ) | Specifies whether network time use is on or off. For example: systemsetup -setusingnetworktime on |
-setWaitForStartupAfterPowerFailure seconds | Sets the number of seconds after which the computer will start up after a power failure. The seconds value must be a multiple of 30 seconds. For example: systemsetup -setWaitForStartupAfterPowerFailure 30 |
-setwakeonnetworkaccess ( on | off ) | Specifies whether the computer wakes from sleep when a network admin packet is sent to it. For example: systemsetup -setwakeonnetworkaccess on |