< Back
Set-AzureRmVmssStorageProfile
Post
NAME Set-AzureRmVmssStorageProfile
SYNOPSIS
Sets the storage profile properties for the VMSS.
SYNTAX
Set-AzureRmVmssStorageProfile [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [[-ImageReferencePublisher] <String>] [[-VhdContainer]
<String[]>] [[-ImageReferenceOffer] <String>] [[-ImageReferenceSku] <String>] [[-ImageReferenceVersion] <String>] [[-OsDiskName] <String>]
[[-OsDiskCaching] {None | ReadOnly | ReadWrite}] [[-OsDiskCreateOption] <String>] [[-OsDiskOsType] {Windows | Linux}] [[-Image] <String>]
[-DataDisk <VirtualMachineScaleSetDataDisk[]>] [-DefaultProfile <IAzureContextContainer>] [-ImageReferenceId <String>] [-ManagedDisk <String>]
[-OsDiskWriteAccelerator] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmVmssStorageProfile cmdlet sets the storage profile properties for the Virtual Machine Scale Set (VMSS).
PARAMETERS
-DataDisk <VirtualMachineScaleSetDataDisk[]>
Specifies the data disk object.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-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
-Image <String>
Specifies the blob URI for the user image. VMSS creates an operating system disk in the same container of the user image.
Required? false
Position? 9
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceId <String>
Specifies the image reference ID.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceOffer <String>
Specifies the type of virtual machine image (VMImage) offer. To obtain an image offer, use the Get-AzureRmVMImageOffer cmdlet.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferencePublisher <String>
Specifies the name of a publisher of a VMImage. To obtain a publisher, use the Get-AzureRmVMImagePublisher cmdlet.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceSku <String>
Specifies the VMImage SKU. To obtain SKUs, use the Get-AzureRmVMImageSku cmdlet.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceVersion <String>
Specifies the version of the VMImage. To use the latest version, specify a value of latest instead of a particular version.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ManagedDisk <String>
Specifies the managed disk.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskCaching <CachingTypes>
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.
Required? false
Position? 6
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskCreateOption <String>
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.
Required? false
Position? 7
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskName <String>
Specifies the name of the operating system disk.
Required? false
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskOsType <OperatingSystemTypes>
Specifies the type of operating system on the disk. This is only needed for user image scenarios and not for a platform image.
Required? false
Position? 8
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskWriteAccelerator [<SwitchParameter>]
Specifies whether WriteAccelerator should be enabled or disabled on the OS disk.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-VhdContainer <String[]>
Specifies the container URLs that are used to store operating system disks for the VMSS.
Required? false
Position? 10
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VirtualMachineScaleSet <PSVirtualMachineScaleSet>
Specifies the VMSS object. To obtain the object, use the New-AzureRmVmssConfig 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
This cmdlet does not generate any output.
OUTPUTS
Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet
NOTES
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ageprofile
Get-AzureRmVMImageOffer
Get-AzureRmVMImagePublisher
Get-AzureRmVMImageSku
New-AzureRmVmssConfig
SYNOPSIS
Sets the storage profile properties for the VMSS.
SYNTAX
Set-AzureRmVmssStorageProfile [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [[-ImageReferencePublisher] <String>] [[-VhdContainer]
<String[]>] [[-ImageReferenceOffer] <String>] [[-ImageReferenceSku] <String>] [[-ImageReferenceVersion] <String>] [[-OsDiskName] <String>]
[[-OsDiskCaching] {None | ReadOnly | ReadWrite}] [[-OsDiskCreateOption] <String>] [[-OsDiskOsType] {Windows | Linux}] [[-Image] <String>]
[-DataDisk <VirtualMachineScaleSetDataDisk[]>] [-DefaultProfile <IAzureContextContainer>] [-ImageReferenceId <String>] [-ManagedDisk <String>]
[-OsDiskWriteAccelerator] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmVmssStorageProfile cmdlet sets the storage profile properties for the Virtual Machine Scale Set (VMSS).
PARAMETERS
-DataDisk <VirtualMachineScaleSetDataDisk[]>
Specifies the data disk object.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-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
-Image <String>
Specifies the blob URI for the user image. VMSS creates an operating system disk in the same container of the user image.
Required? false
Position? 9
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceId <String>
Specifies the image reference ID.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceOffer <String>
Specifies the type of virtual machine image (VMImage) offer. To obtain an image offer, use the Get-AzureRmVMImageOffer cmdlet.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferencePublisher <String>
Specifies the name of a publisher of a VMImage. To obtain a publisher, use the Get-AzureRmVMImagePublisher cmdlet.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceSku <String>
Specifies the VMImage SKU. To obtain SKUs, use the Get-AzureRmVMImageSku cmdlet.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageReferenceVersion <String>
Specifies the version of the VMImage. To use the latest version, specify a value of latest instead of a particular version.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ManagedDisk <String>
Specifies the managed disk.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskCaching <CachingTypes>
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.
Required? false
Position? 6
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskCreateOption <String>
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.
Required? false
Position? 7
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskName <String>
Specifies the name of the operating system disk.
Required? false
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskOsType <OperatingSystemTypes>
Specifies the type of operating system on the disk. This is only needed for user image scenarios and not for a platform image.
Required? false
Position? 8
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OsDiskWriteAccelerator [<SwitchParameter>]
Specifies whether WriteAccelerator should be enabled or disabled on the OS disk.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-VhdContainer <String[]>
Specifies the container URLs that are used to store operating system disks for the VMSS.
Required? false
Position? 10
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VirtualMachineScaleSet <PSVirtualMachineScaleSet>
Specifies the VMSS object. To obtain the object, use the New-AzureRmVmssConfig 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
This cmdlet does not generate any output.
OUTPUTS
Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet
NOTES
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ageprofile
Get-AzureRmVMImageOffer
Get-AzureRmVMImagePublisher
Get-AzureRmVMImageSku
New-AzureRmVmssConfig