![]() |
VOOZH | about |
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details.
Command:
Get-AzVM
Output:
👁 ImageUse the below command to get all properties of an Azure VM server:
Command:
Get-AzVM -Name "vm_name" -ResourceGroup "resource_group_name"
Example:
Get-AzVM -Name "CloudOpsVM" -ResourceGroup "Cloud-Operations"
Output:
👁 ImageUse the below command to expand the complete properties of an Azure VM Extension:
Command:
Get-AzVM -Name "vm_name" -ResourceGroup "resource_group_name" ` | Select -ExpandProperty Extensions
Example:
Get-AzVM -Name "CloudOpsVM" -ResourceGroup "Cloud-Operations" ` | Select -ExpandProperty Extensions
Output:
👁 ImageTo get the names of Azure VM extensions, use the below command:
Command:
Get-AzVM -Name "vm_name" -ResourceGroup "resource_group_name" ` | Select -ExpandProperty Extensions ` | Select Name
Example:
Get-AzVM -Name "CloudOpsVM" -ResourceGroup "Cloud-Operations" ` | Select -ExpandProperty Extensions ` | Select Name
Output:
👁 ImageUse the below command to get the size of an Azure VM:
Command:
Get-AzVM -Name "vm_name" -ResourceGroup "resource_group_name" ` | Select -ExpandProperty HardwareProfile
Example:
Get-AzVM -Name "CloudOpsVM" -ResourceGroup "Cloud-Operations" ` | Select -ExpandProperty HardwareProfile
Output:
👁 Image