如何通过 Azure PowerShell 获取 PublishUrl? [英] How can I get the PublishUrl via Azure PowerShell?
问题描述
My goal is to be able to pass in a site name and location and have a new site created, retrieve the appropriate credentials/URLs and deploy my site with WebDeploy.
I'm using the Azure Powershell Tools from here: http://www.windowsazure.com/en-us/downloads/
I am able to create a new website with
New-AzureWebsite -Name site-name -Location "West US"
In response to this I get details about the created site, including the publishing username and password (PublishingUsername and PublishingPassword), the one piece of information I do not get that I need is the publishing URL (which I can retrieve from the Azure Management portal in an XML formatted file). In the XML file it is the publishUrl attribute on the publishProfile node.
My question is, is there a way via PowerShell to get the publishing URL, or via the REST API, but I would prefer PowerShell.
This is a similar question, which sounds like its not yet possible, at least at the time of writing: How can I get the FTP URL for my Azure website via the Management API?
Get-AzureWebSite -Name site-name
will return the 'Git Repository' url in it's output
Get-AzureWebSite -Name site-name
Property=SelfLink
If you take the host name and replace api
with publish
you have the publishing url. Keep in mind that the publishing url is a secure connection so it connects over port 443
这篇关于如何通过 Azure PowerShell 获取 PublishUrl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!