< Back

Remove-AzureRmVmssDataDisk

Tue Jan 29, 2019 9:39 pm

NAME Remove-AzureRmVmssDataDisk



SYNOPSIS

Removes a data disk from the VMSS.





SYNTAX

Remove-AzureRmVmssDataDisk [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [-Lun] <Int32> [-DefaultProfile <IAzureContextContainer>]

[-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmVmssDataDisk [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]

[-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Remove-AzureRmVmssDataDisk cmdlet removes a data disk from the Virtual Machine Scale Set (VMSS) instance.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Lun <Int32>

Specifies the logical unit number of the disk.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name of the disk.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VirtualMachineScaleSet <PSVirtualMachineScaleSet>

Specify the VMSS object.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSet

System.String System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]





OUTPUTS

Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSet







NOTES









Example 1



PS C:\\> Remove-AzureRmVmssDataDisk -VirtualMachineScaleSet $vmss -Name 'DataDisk1'



This command removes the data disk named 'DataDisk1' from the VMSS object.





Example 2



PS C:\\> Remove-AzureRmVmssDataDisk -VirtualMachineScaleSet $vmss -Lun 0



This command removes the data disk of LUN 0 from the VMSS object.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ssdatadisk