Update snapshot Property by using Azure Automation account
Hello,
I have a Backup vault that takes snapshot for OS disks and shared disks everyday, during 14 days.
When checking the snapshot file, the network setting is enabled public access from all network. Because there are a lot of snapshot file that I need to change network setting to Disable public and private access, so I can't do it manually.
Look forward for so a solution change network setting by using Automation account, please .
Below is my script in automation account, but it was failed :
$snapshotnames = (Get-AzSnapshot -resourceGroupName 'td.hanh').Name
az snapshot update -snapshotnames $snapshot --network-access-policy DenyAll