I've made a custom deployment based on starter pack, adding the tcp port I need, I've used VS "publish" option because I want to enable remote connection. I had to also set a storage connection string which I picked up from server explorer in VS.
In my script when I issue this:
let subscription = Config.GetSubscriptionManager()
subscription.GetDeployments()
It doesn't pickup the deployment and just returns an empty array, although I can see in the portal there is one deployment matching what I published from VS.