Azure Virtual Machine Primary Interface

Here’s a very quick way of finding out the primary interface of your Virtual Machine in Azure, if you got multiple Network Interface Cards. This will only function for your current subscription.

#1. Simple Powershell Azure command get all the primary network interface card for your current subscription.
Get-AzureRmNetworkInterface | ?{$_.Primary -eq $true}

I had a situation where i knew which is my primary network interface card, however i wanted to be sure double sure by verifying the result through powershell.

Happy Learning

Hardeep

 

Leave a Reply

Your email address will not be published. Required fields are marked *