Set-AzureVMImageOSDiskConfig
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Set-AzureVMImageOSDiskConfig
Allows you to update the OS Disk properties on the VM Image
Syntax
Parameter Set: Default
Set-AzureVMImageOSDiskConfig [-DiskConfig] <VirtualMachineImageDiskConfigSet> [[-HostCaching] <String> ] [ <CommonParameters>]
Parameters
-DiskConfig<VirtualMachineImageDiskConfigSet>
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-HostCaching<String>
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
C:\PS>$s = New-AzureDiskConfigSet
# returns DiskConfigSet object;
$s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite
# returns DiskConfigSet object;
$s = Set-AzureDataDiskConfig -DiskConfig $s -Name 'test' -HostCaching 'ReadWrite' -LUN 0
# returns DiskConfigSet object
# Final step - Update the VM Image
Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1 -DiskConfigSet $s;
# OR
$s | Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1;