@prashanth miryala Thanks for posting your query on Microsoft Q&A.
You are using the right command, try it with a few updates shared below.
You can use the PowerShell command (shared below) to find supported VM sizes for a particular region, to enable end-to-end encryption using encryption at host.
This example shows you the supported VM sizes for the region eastus. Similarly, you can find the find the supported SKU sizes for any region you are interested in.
$vmSizes=Get-AzComputeResourceSku | where{$_.ResourceType -eq 'virtualMachines' -and $_.Locations.Contains('eastus')}
foreach($vmSize in $vmSizes)
{
foreach($capability in $vmSize.capabilities)
{
if($capability.Name -eq 'EncryptionAtHostSupported' -and $capability.Value -eq 'true')
{
$vmSize
}
}
}
I executed above command in Azure Cloud Shell on Azure Portal and it resulted into output as below:
Please note:
- Use lower case for region (example - eastus) in the command above.
- While copying the command from above, you might see an error while pasting on Cloud Shell as it might add spaces, please paste this PowerShell command instead with the region updated, in notepad or another editor.
- I will ensure that the documentation is updated with better region example.
If you have any questions at all, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
Please don’t forget to Accept Answer and hit Yes for "was this answer helpful" wherever the information provided helps you. This can be beneficial to other community members for remediation for similar issues.