Azure Custom Reports : Virtual Machine Encryption Status
To maintain any environment it is necessary to have good reporting . Today I will be sharing my simple Power-Shell script which can run directly from the Azure ClI and can show the encryption Status for the OS and Data disk for all the Virtual machines deployed in the azure subscription. Microsoft Azure cloud platform can used to host different kinds of workloads. We will be taking about IaaS (Infrastructure As A Service) workload AKA Virtual machine on cloud.
Get-AzVmDiskEncryptionStatus -ResourceGroupName “MyResourceGroup001” -VMName “VM001"
The above command will give us the encryption information one virtual machine. I have created a script which can help you get the encryption information for all the virtual machine in your azure environment. You don't need to make any changes to the script, run it directly to get results.
- You have authorized to run command on the azure subscription.
- I recommend to test the script first in your test environment.
- This script does not delete or restart any VM, but still please use it at your own risk.
Let start !
- Browse to https://portal.azure.com
- Login to the portal using your credentials.
- Open the cloud shell from the right top corner
4. Download the script from Github using the below link
5. Save the file with ps1 extension
6. Upload the script using the upload option
7. Run the Report.ps1 file to get the report.