Wouldn't this work for configuring lots of open ports: https://msdn.microsoft.com/library/azure/dn495300.aspx?
Never used the cmdlets for Azure and it's been a while that I dealt with it, but that sounds like an issue you'd only do via the web interface if you're insane.