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.
(Validation Errors: Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a value for setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword' for role 'MBrace.Azure.WorkerRole'.,Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a value for setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration' for role 'MBrace.Azure.WorkerRole'.,Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a value for setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername' for role 'MBrace.Azure.WorkerRole'.,Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a value for setting 'Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled' for role 'MBrace.Azure.WorkerRole'.,Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a value for setting 'Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled' for role 'MBrace.Azure.WorkerRole'.,Error validating the .cscfg file against the .csdef file. Severity:Error, message:The service configuration file does not provide a certificate identification information for certificate 'Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption' for role 'MBrace.Azure.WorkerRole'.)