< Back

Remove-AzureVMImageDataDiskConfig

Wed Jan 30, 2019 5:52 pm

NAME Remove-AzureVMImageDataDiskConfig



SYNOPSIS

Removes the data disk configuration from the DiskConfigSet object.





SYNTAX

Remove-AzureVMImageDataDiskConfig [-DiskConfig] <VirtualMachineImageDiskConfigSet> [-DataDiskName] <String> [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]



Remove-AzureVMImageDataDiskConfig [-DiskConfig] <VirtualMachineImageDiskConfigSet> [-Lun] <Int32> [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The Remove-AzureVMImageDataDiskConfig cmdlet removes the data disk configuration from the DiskConfigSet object.





PARAMETERS

-DiskConfig <VirtualMachineImageDiskConfigSet>

Specifies the disk configuration object that encapsulates the operating system disk and data disk objects.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-DataDiskName <String>

Specifies the name of the data disk that this cmdlet removes.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Lun <Int32>

Specifies the slot where the data drive is mounted in the virtual machine.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet







NOTES









-------------------------- Example 1: Remove the data disk configuration from the DiskConfigSet object --------------------------



PS C:\\>$Disk = New-AzureDiskConfigSet

PS C:\\> $Disk = Set-AzureDataDiskConfig -DiskConfig $Disk -HostCaching ReadWrite

PS C:\\> Remove-AzureVMImageDataDiskConfig -DiskConfig $Disk



This example creates a DiskConfigSet, configures it, then removes the data disk.



RELATED LINKS

Set-AzureVMImageDataDiskConfig

Azure Service Cmdlets