I copy pasted the function into my console and tested it with a snapin that was assigned to just my computer and it did in fact queue it to deploy.
This could be altered to quickly deploy to a given list of hosts or groups as well. Giving you a quick command line method for deploying snapins to hosts in a variety of ways.
If this is something that would achieve what you’re going for let me know and maybe I can add in the functions to the api module so they just exist and then you have a deployment tool via command line, which is typically quicker in my humble opinion