This is how I power off all my lan devices in one shot, however I don't understood the OP expectation, so not put any example previously.
Additionally to fully answer to his own request, there's the "sudo shutdown -r now" option to allow to reboot the PI device
Other approach would be also, to use "sudo poweroff" or "sudo reboot" respectively on any taste, when these ones are available.