How do I change the Hostname (sysName) of the TP-SW4G-2SFP or TP-SW8G-2SFP?

Connect to the console via the console serial port (115200,8,1,N) or via SSH using software like Putty.