Skip to content

Commit e3d3964

Browse files
committed
Fixing script.
1 parent b8f9f38 commit e3d3964

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

articles/virtual-machines/disks-incremental-snapshots.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ az snapshot show -n $sourceSnapshotName -g $resourceGroupName --query [completio
176176

177177
### PowerShell
178178

179-
First, get a list of all snapshots associated with a particular disk. Replace `yourResourceGroupNameHere` with your value and then you can use the following script to list your existing incremental snapshots of Ultra Disks:
179+
The following script creates a list of all incremental snapshots associated with a particular disk that haven't completed their background copy. Replace `yourResourceGroupNameHere` and `yourDiskNameHere`, then run the script.
180180

181181
```azurepowershell
182182
$resourceGroupName = "yourResourceGroupNameHere"
@@ -198,21 +198,12 @@ foreach ($snapshot in $snapshots)
198198
$incrementalSnapshots.Add($targetSnapshot)
199199
}
200200
}
201-
$incrementalSnapshots.Add($snapshot)
202201
}
203202
}
204203
205204
$incrementalSnapshots
206205
```
207206

208-
Now that you have a list of snapshots, you can check the `CompletionPercent` property of an individual snapshot to get its status. Replace `$snapshotName` with the name of your snapshot, then run the following script to get the snapshot's status. The snapshot process must be complete for the snapshot to be used for restoring a disk or generating a SAS to download the snapshot.
209-
210-
```azurepowershell
211-
$targetSnapshot=Get-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName
212-
213-
$targetSnapshot.CompletionPercent
214-
```
215-
216207
## Check sector size
217208

218209
Snapshots with a 4096 logical sector size can only be used to create Ultra Disks. They can't be used to create other disk types. Snapshots of disks with 4096 logical sector size are stored as VHDX, whereas snapshots of disks with 512 logical sector size are stored as VHD. Snapshots inherit the logical sector size from the parent disk.

0 commit comments

Comments
 (0)