Get-​Azure​Rm​Vmss​VM

Gets the properties of a VMSS virtual machine.

Syntax

Get-AzureRmVmssVM
   [[-ResourceGroupName] <String>]
   [[-VMScaleSetName] <String>]
   [[-InstanceId] <String>]
   [-InstanceView]
   [<CommonParameters>]

Description

The Get-AzureRmVmssVM cmdlet gets the model view and instance view of a Virtual Machine Scale Set (VMSS) virtual machine. The model view is the user specified properties of the virtual machine. The instance view is the instance level status of the virtual machine. Specify the Status parameter to get only the instance view of a virtual machine.

Examples

Example 1: Get the properties of a VMSS virtual machine

PS C:\> Get-AzureRmVmssVM -ResourceGroupName "Group001" -VMScaleSetName "VMSS001"

This command gets the properties of the VMSS virtual machine named VMSS001 that belongs to the resource group named Group001. Since the command does not specify the InstanceView switch parameter, the cmdlet gets the model view of the virtual machine.

Example 2: Get the model view properties of a VMSS virtual machine

PS C:\> Get-AzureRmVmssVM -ResourceGroupName "Group002" -VMScaleSetName "VMSS004" -InstanceId $ID

This command gets the properties of the VMSS virtual machine named VMSS004 that belongs to the resource group named Group002. The command gets the instance ID stored in the variable $ID for which to get the model view.

Example 3: Get the instance view properties of a VMSS virtual machine

PS C:\> Get-AzureRmVmssVM -InstanceView  -ResourceGroupName $rgname  -VMScaleSetName $vmssName -InstanceId $ID

This command gets the properties of the VMSS virtual machine named VMSS004 that belongs to the resource group named Group002. Since the command specifies the InstanceView switch parameter, the cmdlet gets the instance view of the virtual machine. The command gets the instance ID stored in the variable $ID for which to get the instance view.

Required Parameters

-InstanceView

Indicates that this cmdlet gets only the instance view of the virtual machine.

Type:SwitchParameter
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-InstanceId

Specifies the instance ID for which to get the model view.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the Resource Group of the VMSS.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VMScaleSetName

Species the name of the VMSS.

Type:String
Aliases:Name
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

This cmdlet does not generate any output.