Edit

Share via


Set-AzVmssVM

Modifies the state of a VMSS instance.

Syntax

DefaultParameter (Default)

Set-AzVmssVM
    [-ResourceGroupName] <String>
    [-VMScaleSetName] <String>
    [-InstanceId] <String>
    [-Reimage]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

FriendMethod

Set-AzVmssVM
    [-ResourceGroupName] <String>
    [-VMScaleSetName] <String>
    [-InstanceId] <String>
    [-ReimageAll]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

RedeployMethodParameter

Set-AzVmssVM
    [-ResourceGroupName] <String>
    [-VMScaleSetName] <String>
    [-InstanceId] <String>
    [-Redeploy]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

PerformMaintenanceMethodParameter

Set-AzVmssVM
    [-ResourceGroupName] <String>
    [-VMScaleSetName] <String>
    [-InstanceId] <String>
    [-PerformMaintenance]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SimulateEvictionMethodParameter

Set-AzVmssVM
    [-ResourceGroupName] <String>
    [-VMScaleSetName] <String>
    [-InstanceId] <String>
    [-SimulateEviction]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzVmssVM cmdlet modifies the state of a Virtual Machine Scale Set (VMSS) instance.

Examples

Example 1

Modifies the state of a VMSS instance. (autogenerated)

Set-AzVmssVM -InstanceId <String> -Reimage -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001'

Example 2

Modifies the state of a VMSS instance. (autogenerated)

Set-AzVmssVM -InstanceId <String> -PerformMaintenance -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001'

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstanceId

Specifies the ID of the VMSS instance for which this cmdlet modifies state.

Parameter properties

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

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PerformMaintenance

Indicates that this cmdlet performs maintenance on a virtual machine in the VMSS.

Parameter properties

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

Parameter sets

PerformMaintenanceMethodParameter
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Redeploy

Indicates that this cmdlet redeploys a virtual machine in the VMSS.

Parameter properties

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

Parameter sets

RedeployMethodParameter
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Reimage

Indicates that this cmdlet reimages the VMSS instance.

Parameter properties

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

Parameter sets

DefaultParameter
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReimageAll

Indicates that the cmdlet reimages all the disks in the VMSS instance.

Parameter properties

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

Parameter sets

FriendMethod
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of the resource group that contains the VMSS instance.

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SimulateEviction

Indicates that this cmdlet simulates the eviction of spot virtual machine in a VM scale set. The eviction will occur within 30 minutes of calling the API.

Parameter properties

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

Parameter sets

SimulateEvictionMethodParameter
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMScaleSetName

Specifies the name of the VMSS instance that this cmdlet modifies.

Parameter properties

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

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

PSOperationStatusResponse