< Back
Set-AzureRmVmssDiskEncryptionExtension
Post
NAME Set-AzureRmVmssDiskEncryptionExtension
SYNOPSIS
Enables disk encryption on a VM scale set.
SYNTAX
Set-AzureRmVmssDiskEncryptionExtension [-ResourceGroupName] <String> [-VMScaleSetName] <String> [-DiskEncryptionKeyVaultUrl] <String>
[-DiskEncryptionKeyVaultId] <String> [-DefaultProfile <IAzureContextContainer>] [-DisableAutoUpgradeMinorVersion] [-ExtensionName <String>]
[-Force] [-ForceUpdate] [-KeyEncryptionAlgorithm {RSA-OAEP | RSA1_5}] [-KeyEncryptionKeyUrl <String>] [-KeyEncryptionKeyVaultId <String>]
[-Passphrase <String>] [-TypeHandlerVersion <String>] [-VolumeType {OS | Data | All}] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmVmssDiskEncryptionExtension cmdlet enables encryption on a VM scale set. This cmdlet enables encryption by installing the disk
encryption extension on the VM scale set. If no Name parameter is specified, an extension with the default name AzureDiskEncryption for virtual
machines that run the Windows operating system or AzureDiskEncryptionForLinux for Linux virtual machines are installed.
PARAMETERS
-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
-DisableAutoUpgradeMinorVersion [<SwitchParameter>]
Disable auto-upgrade of minor version
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DiskEncryptionKeyVaultId <String>
ResourceID of the KeyVault where generated encryption key will be placed to
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DiskEncryptionKeyVaultUrl <String>
URL of the KeyVault where generated encryption key will be placed to
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ExtensionName <String>
The extension name. If this parameter is not specified, default values used are AzureDiskEncryption for windows VMs and
AzureDiskEncryptionForLinux for Linux VMs
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
To force enabling encryption on the virtual machine scale set.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceUpdate [<SwitchParameter>]
Generate a tag for force update. This should be given to perform repeated encryption operations on the same VM.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionAlgorithm <String>
KeyEncryption Algorithm used to encrypt the volume encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionKeyUrl <String>
Versioned KeyVault URL of the KeyEncryptionKey used to encrypt the disk encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionKeyVaultId <String>
ResourceID of the KeyVault containing the KeyEncryptionKey used to encrypt the disk encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Passphrase <String>
The passphrase specified in parameters. This parameter only works for Linux VM.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
The resource group name to which the VM Scale Set belongs to
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TypeHandlerVersion <String>
The type handler version.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VMScaleSetName <String>
Name of the virtual machine scale set
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VolumeType <String>
Type of the volume (OS or Data) to perform encryption operation
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
System.String
System.Management.Automation.SwitchParameter
OUTPUTS
Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineScaleSetExtension
NOTES
Example 1
$RGName = "MyResourceGroup"
$VmssName = "MyTestVmss"
$VaultName= "MyKeyVault"
$KeyVault = Get-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $RGName
$DiskEncryptionKeyVaultUrl = $KeyVault.VaultUri
$KeyVaultResourceId = $KeyVault.ResourceId
PS C:\\> Set-AzureRmVmssDiskEncryptionExtension -ResourceGroupName $RGName -VMScaleSetName $VmssName -DiskEncryptionKeyVaultUrl
$DiskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId
This command enables encryption on all disks of all VMs in the VM scale set.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... nextension
SYNOPSIS
Enables disk encryption on a VM scale set.
SYNTAX
Set-AzureRmVmssDiskEncryptionExtension [-ResourceGroupName] <String> [-VMScaleSetName] <String> [-DiskEncryptionKeyVaultUrl] <String>
[-DiskEncryptionKeyVaultId] <String> [-DefaultProfile <IAzureContextContainer>] [-DisableAutoUpgradeMinorVersion] [-ExtensionName <String>]
[-Force] [-ForceUpdate] [-KeyEncryptionAlgorithm {RSA-OAEP | RSA1_5}] [-KeyEncryptionKeyUrl <String>] [-KeyEncryptionKeyVaultId <String>]
[-Passphrase <String>] [-TypeHandlerVersion <String>] [-VolumeType {OS | Data | All}] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmVmssDiskEncryptionExtension cmdlet enables encryption on a VM scale set. This cmdlet enables encryption by installing the disk
encryption extension on the VM scale set. If no Name parameter is specified, an extension with the default name AzureDiskEncryption for virtual
machines that run the Windows operating system or AzureDiskEncryptionForLinux for Linux virtual machines are installed.
PARAMETERS
-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
-DisableAutoUpgradeMinorVersion [<SwitchParameter>]
Disable auto-upgrade of minor version
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DiskEncryptionKeyVaultId <String>
ResourceID of the KeyVault where generated encryption key will be placed to
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DiskEncryptionKeyVaultUrl <String>
URL of the KeyVault where generated encryption key will be placed to
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ExtensionName <String>
The extension name. If this parameter is not specified, default values used are AzureDiskEncryption for windows VMs and
AzureDiskEncryptionForLinux for Linux VMs
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
To force enabling encryption on the virtual machine scale set.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceUpdate [<SwitchParameter>]
Generate a tag for force update. This should be given to perform repeated encryption operations on the same VM.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionAlgorithm <String>
KeyEncryption Algorithm used to encrypt the volume encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionKeyUrl <String>
Versioned KeyVault URL of the KeyEncryptionKey used to encrypt the disk encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyEncryptionKeyVaultId <String>
ResourceID of the KeyVault containing the KeyEncryptionKey used to encrypt the disk encryption key
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Passphrase <String>
The passphrase specified in parameters. This parameter only works for Linux VM.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
The resource group name to which the VM Scale Set belongs to
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TypeHandlerVersion <String>
The type handler version.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VMScaleSetName <String>
Name of the virtual machine scale set
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VolumeType <String>
Type of the volume (OS or Data) to perform encryption operation
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
System.String
System.Management.Automation.SwitchParameter
OUTPUTS
Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineScaleSetExtension
NOTES
Example 1
$RGName = "MyResourceGroup"
$VmssName = "MyTestVmss"
$VaultName= "MyKeyVault"
$KeyVault = Get-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $RGName
$DiskEncryptionKeyVaultUrl = $KeyVault.VaultUri
$KeyVaultResourceId = $KeyVault.ResourceId
PS C:\\> Set-AzureRmVmssDiskEncryptionExtension -ResourceGroupName $RGName -VMScaleSetName $VmssName -DiskEncryptionKeyVaultUrl
$DiskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId
This command enables encryption on all disks of all VMs in the VM scale set.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... nextension