Azure Snapshot properties error

Gaurav Singh 130 Reputation points
2023-08-17T15:13:46.4266667+00:00

Hello Team,

I am getting the error below with a script for making changes in snapshot networking properties , I looked up the official docs but didn't find the details for the properties in the error,

can you look up the error and guide me through it?

User's image

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
668 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luke Murray 11,436 Reputation points MVP Volunteer Moderator
    2023-08-18T06:46:04.7266667+00:00

    Hi, you are close:

    You don't need to do, $snapshot.properties.DiskProperties.NetworkAccessPolicy.

    All you need to do is:

    $snapshot.NetworkAccessPolicy = "DenyAll"

    $snapshot | $a | Update-AzSnapshot

    This was my test:

    $a = Get-AzSnapshot -ResourceGroupName DefaultResourceGroup-EAU -SnapshotName sdsd

    $a.PublicNetworkAccess = "Disabled"

    $a.NetworkAccessPolicy = "DenyAll"

    $a | Update-AzSnapshot

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.