Remove-AzVmssVMDataDisk
Removes a data disk from a virtual machine scale set VM
Sintaxis
Default (Es el valor predeterminado).
Remove-AzVmssVMDataDisk
[-VirtualMachineScaleSetVM] <PSVirtualMachineScaleSetVM>
[-Lun] <Int32>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Remove-AzVmssVMDataDisk cmdlet removes a data disk from a VM scale set VM
Ejemplos
Example 1: Remove a data disk from a VM scale set VM
$VmssVM = Get-AzVmssVM -ResourceGroupName "myrg" -VMScaleSetName "myvmss" -InstanceId 0
Remove-AzVmssVMDataDisk -VirtualMachineScaleSetVM $VirtualMachine -Lun 0
Update-AzVmssVM -VirtualMachineScaleSetVM $VmssVM
The first command getsan existing Vmss VM given by the resource group name, the vmss name and the instance ID. The second command removes the data disk lun 0 from the VM scale set VM stored in $VmssVM The final command updates the Vmss VM with removed data disk.
Parámetros
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Propiedades del parámetro
Tipo: | IAzureContextContainer |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | AzContext, AzureRmContext, AzureCredential |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-Lun
Specifies the logical unit number of the disk.
Propiedades del parámetro
Tipo: | Int32 |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | 1 |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-VirtualMachineScaleSetVM
The virtual machine scale set VM profile.
Propiedades del parámetro
Tipo: | PSVirtualMachineScaleSetVM |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | 0 |
Mandatory: | True |
Valor de la canalización: | True |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | 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.