Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-AzVmssVM

Gets the properties of a VMSS virtual machine.

Syntax

DefaultParameter (Default)

Get-AzVmssVM
 [[-ResourceGroupName] <String>]
 [[-VMScaleSetName] <String>]
 [[-InstanceId] <String>]
 [-UserData]
 [-ResiliencyView]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

FriendMethod

Get-AzVmssVM
 [[-ResourceGroupName] <String>]
 [[-VMScaleSetName] <String>]
 [[-InstanceId] <String>]
 [-InstanceView]
 [-UserData]
 [-ResiliencyView]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The Get-AzVmssVM 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

Get-AzVmssVM -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

Get-AzVmssVM -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

Get-AzVmssVM -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.

Example 4: Get the resilient VM deletion status of a VMSS virtual machine

Get-AzVmssVM -ResiliencyView -ResourceGroupName "Group001" -VMScaleSetName "VMSS001" -InstanceId "0"

This command gets the resilient VM deletion status for the VMSS virtual machine with instance ID 0 in the scale set VMSS001. The ResiliencyView parameter retrieves the ResilientVMDeletionStatus property, which indicates whether automatic delete retries are in progress, failed, or not started. This is useful for monitoring the Resilient Delete feature status.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-InstanceId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-InstanceView

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResiliencyView

Gets the resilient VM deletion status for the VM, which indicates whether retries are in progress, failed, or not started. This parameter is only supported when retrieving a specific VM instance (when InstanceId is provided).

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Specifies the name of the Resource Group of the VMSS.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-UserData

UserData for the Vmss, which will be base-64 encoded. Customer should not pass any secrets in here.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-VMScaleSetName

Specifies the name of the VMSS.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Name

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

PSVirtualMachineScaleSetVM

Related Links


Feedback

Was this page helpful?