Set-AzureRmVmssStorageProfile
Syntax
Set-AzureRmVmssStorageProfile
[-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
[[-ImageReferencePublisher] <String>]
[[-ImageReferenceOffer] <String>]
[[-ImageReferenceSku] <String>]
[[-ImageReferenceVersion] <String>]
[[-OsDiskName] <String>]
[[-OsDiskCaching] <CachingTypes>]
[[-OsDiskCreateOption] <String>]
[[-OsDiskOsType] <OperatingSystemTypes>]
[[-Image] <String>]
[[-VhdContainer] <String[]>]
[-ImageReferenceId <String>]
[-OsDiskWriteAccelerator]
[-DiffDiskSetting <String>]
[-ManagedDisk <String>]
[-DataDisk <VirtualMachineScaleSetDataDisk[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzureRmVmssStorageProfile cmdlet sets the storage profile properties for the Virtual Machine Scale Set (VMSS).
Examples
Example 1: Set the storage profile properties for the VMSS
PS C:\> Set-AzureRmVmssStorageProfile -VirtualMachineScaleSet "ContosoVMSS" -Name "Test" -OsDiskCreateOption "FromImage" -OsDiskCaching "None" `
-ImageReferenceOffer $ImgRef.Offer -ImageReferenceSku $ImgRef.Skus -ImageReferenceVersion $ImgRef.Version `
-ImageReferencePublisher $ImgRef.PublisherName -VhdContainer $VhdContainer
This command sets the storage profile properties for the VMSS named ContosoVMSS.
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the data disk object.
Type: | Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetDataDisk[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the differencing disk settings for operating system disk.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the blob URI for the user image. VMSS creates an operating system disk in the same container of the user image.
Type: | String |
Position: | 9 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the image reference ID.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the type of virtual machine image (VMImage) offer. To obtain an image offer, use the Get-AzureRmVMImageOffer cmdlet.
Type: | String |
Position: | 2 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the name of a publisher of a VMImage. To obtain a publisher, use the Get-AzureRmVMImagePublisher cmdlet.
Type: | String |
Position: | 1 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the VMImage SKU. To obtain SKUs, use the Get-AzureRmVMImageSku cmdlet.
Type: | String |
Position: | 3 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the version of the VMImage. To use the latest version, specify a value of latest instead of a particular version.
Type: | String |
Position: | 4 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the managed disk.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the caching mode of the operating system disk. The acceptable values for this parameter are:
- ReadOnly
- ReadWrite The default value is ReadWrite. If you change the caching value, the cmdlet will restart the virtual machine. This setting affects the consistency and performance of the disk.
Type: | System.Nullable`1[Microsoft.Azure.Management.Compute.Models.CachingTypes] |
Accepted values: | None, ReadOnly, ReadWrite |
Position: | 6 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies how this cmdlet creates the VMSS virtual machines. The acceptable values for this parameter are:
- Attach : This value is used when you are using a specialized disk to create the VMSS virtual machine.
- FromImage : This value is used when you are using an image to create the VMSS virtual machine. If you are using a platform image, you will also use the imageReference parameter.
Type: | String |
Position: | 7 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the name of the operating system disk.
Type: | String |
Aliases: | Name |
Position: | 5 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the type of operating system on the disk. This is only needed for user image scenarios and not for a platform image.
Type: | System.Nullable`1[Microsoft.Azure.Management.Compute.Models.OperatingSystemTypes] |
Accepted values: | Windows, Linux |
Position: | 8 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies whether WriteAccelerator should be enabled or disabled on the OS disk.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the container URLs that are used to store operating system disks for the VMSS.
Type: | System.String[] |
Position: | 10 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the VMSS object. To obtain the object, use the New-AzureRmVmssConfig object.
Type: | PSVirtualMachineScaleSet |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName, ByValue) |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.Nullable`1[[Microsoft.Azure.Management.Compute.Models.CachingTypes, Microsoft.Azure.Management.Compute, Version=21.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
System.Nullable`1[[Microsoft.Azure.Management.Compute.Models.OperatingSystemTypes, Microsoft.Azure.Management.Compute, Version=21.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
System.String[]
Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetDataDisk[]