You might find a shell command will work even on HassOS. Depends on the command being used being supported in the container. You can run a console (with Portainer) and then run the command there. If it works in the container it will work in HA as well.