Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$vmssObject = Get-AzureRmVmss -ResourceGroupName $greenrg -VMScaleSetName $vmssName
$vmssObject.virtualMachineProfile.storageProfile.osDisk.image.uri= $newImageURI
$instances = Get-AzureRmVmssVM -VMScaleSetName $vmssName -ResourceGroupName $greenrg
foreach($instance in $instances){
Update-AzureRmVmssInstance -ResourceGroupName $greenrg -VMScaleSetName $vmssName -InstanceId $instance.InstanceID
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.