Search code examples
powershellazurecloudendpoints

Get Specific PublicPort Endpoint in Azure


I don't know how to Get specific VM's name and details with filter of PublicPort 80 Endpoint in Microsoft Azure Cloud

This is the closet command that I'd found in Google but the filtering part is missing.

Get-AzureVM -ServiceName | Get-AzureEndpoint | Format-Table -AutoSize

Thanks Have a nice day :-)


Solution

  • This is basic powershell. Use a Where-Object (https://technet.microsoft.com/en-us/library/ee177028.aspx).

    i.e. Get-AzureEndpoint | Where-Object {$_.PublicPort -eq 80}