The command-line version of the Kasa Control is TPLinkCmd.exe, this can be added to scripts and shortcuts to control your devices.


you must give a login command before executing a command, the credentials are cached for 5 minutes so for most scripts this is only required once.

TPLinkCmd -login -username "" -password "password"


Add the following at the end of the script, this erases the credentials from the cache.

TPLinkCmd -logoff

Get Device List

This gives a list of the names to use in the commands

TPLinkCmd -devicelist


TPLinkCmd -device "BEDROOM" -on
TPLinkCmd -device "BEDROOM" -off
TPLinkCmd -device "BEDROOM" -toggle
TPLinkCmd -device "BEDROOM" -status
TPLinkCmd -device "BEDROOM" -brightness 62