Azure的PowerShell的分期获取云服务的公共IP [英] Azure Powershell Get Public IP of Staging Cloud Service
问题描述
我使用这个答案来查找我们的云服务的公网IP。
I am using this answer to look up our cloud service's public ip.
<一个href=\"http://stackoverflow.com/questions/16857495/azure-powershell-get-public-virtual-ip-of-service/18194296#18194296\">Azure PowerShell的:获取公共虚拟服务的IP
这仅返回生产云服务的端点。我们还需要轻松地查找我们的分期云服务端点。
This only returns the endpoints for the production cloud services. We also need to easily look up our staging cloud service endpoints.
有谁知道如何与Azure的Powershell的看这些吗?
Does anyone know how to look these up with Azure Powershell?
谢谢!
推荐答案
这是一个班轮和使用什么其他然后得到-AzureDeployment - 直接returs贵宾,只要你至少有一个InputEndpoint定义 - 否则你无法连接到服务反正;)无需繁重或使用DNS客户端...
This is one-liner and uses nothing other then Get-AzureDeployment - and returs directly the VIP, as long as you have at least one InputEndpoint defined - otherwise you can't connect to the service anyway ;) No need of heavy lifting or using DNS client ...
PS C:\> Get-AzureRole -ServiceName "your_service_name" -Slot "staging" -InstanceDetails -RoleName "your_desired_role_name_when_you_have_more_than_one_role" | select {$_.InstanceEndpoints[0].VIP }
,你会得到的VIP。这里最重要的选项 -InstanceDetails 这将让端点。
这篇关于Azure的PowerShell的分期获取云服务的公共IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!