If you don’t like that then you can use this:
Note that the command you want to run MUST be either RCON compatible or be registered using this method:
-- command code here
RegisterCommand()) can be used with server side scripts as well as with client side scripts. Do note however that the command you want to run must be registered on the same side.
TL;DR: Don’t cross use ExecuteCommand and RegisterCommand between server/client scripts.