- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get the Accelerated networking status of Azure VM using PowerShell?
From the Azure Portal, we can find the Accelerated Networking (AN) status from the networking blade.
To get the AN settings on the VM, we need to first retrieve the NIC information because it is set on it. We have the VM named ‘TestVM’ and we will retrieve its NIC information.
PS C:\> $vm = Get-AzVM -Name TestVM
To get the NIC associated with the VM,
$nicname = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1]
We need to retrieve the NIC settings to get the AN setting.
$nicsetting = Get-AzNetworkInterface -ResourceGroupName $vm.ResourceGroupName - Name $nicname
To get the AN settings, use the EnableAcceleratedNetworking property.
$nicsetting.EnableAcceleratedNetworking
If you want to retrieve the AN settings on all the Azure VMs from the particular subscription then use the below command but make sure that you are connected to the particular subscription using the SetAzContext command.
Get-AzVM | Select Name, ResourceGroupName,` @{N='Accelerated Netoworking'; E={ $nic = (($_.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1] $nicsetting = Get-AzNetworkInterface - ResourceGroupName $_.ResourceGroupName -Name $nic $nicsetting.EnableAcceleratedNetworking }}
To set the AN settings on the VMs of the particular resource group, use Get-AzVM - ResourceGroupName ‘ResourceGroup’ instead of Get-AzVM in the above code.
- Related Articles
- How to enable the Azure VM accelerated settings using PowerShell?
- How to disable the Azure VM accelerated settings using PowerShell?
- How to get the Azure VM Size using Azure CLI in PowerShell?
- How to get the Azure VM username using Azure CLI in PowerShell?
- How to get Azure VM activity logs using PowerShell?
- How to get the Azure VM available sizes using PowerShell?
- How to get the installed Azure VM extension using PowerShell?
- How to get the Azure VM DNS name using PowerShell?
- How to get the location of the Azure VM using Azure CLI in PowerShell?
- How to get the available azure VM size using Azure CLI in PowerShell?
- How to get the Power state of the Azure VM using PowerShell?
- How to get the Azure VM disk encryption settings using PowerShell?
- How to get the Azure VM disk caching settings using PowerShell?
- How to get the Azure VM storage account type using PowerShell?
- How to get all the available azure VM images using Azure CLI in PowerShell?
