< Back

New-AzureVMImageDiskConfigSet

Wed Jan 30, 2019 5:49 pm

NAME New-AzureVMImageDiskConfigSet



SYNOPSIS

Creates a disk configuration set object.





SYNTAX

New-AzureVMImageDiskConfigSet [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The New-AzureVMImageDiskConfigSet cmdlet creates a disk configuration set object that is passed to the image update cmdlet. It encapsulates the

OSDiskConfig and the DataDiskConfig object. Use the Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets to set the OS Disk and Data

Disk properties for the virtual machine image.





PARAMETERS

-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



<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: Create a disk configuration set object --------------------------



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

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

PS C:\\> $Disk = Set-AzureDataDiskConfig -DiskConfig $Disk -Name "Test" -HostCaching "ReadWrite" -LUN 0

PS C:\\> Update-AzureVMImage -ImageName "Image2" -Label "Test1" -Description "Test1" -DiskConfigSet $Disk;



This command creates a disk configuration set object and stores the results in the variable named $Disk. After the disk configuration is created, it is

used to set the OSDiskConfig and DataDiskConfig. Then the virtual machine is updated with the configuration.



RELATED LINKS

Get-AzureVMImageDiskConfigSet

Set-AzureVMImageOSDiskConfig

Set-AzureVMImageDataDiskConfig