Application Integration
cancel
Showing results for 
Search instead for 
Did you mean: 

find the last snapshot with powershell

SOLVED
Go to solution
olivier_girard1
Occasional Visitor

find the last snapshot with powershell

when you do a get-nssnapshot, you get in return the volume name and the ID. But no creation date.

How is it possible to find the last snapshot then?

thanks a lot for the assistance!

2 REPLIES
aherbert23
Trusted Contributor
Solution

Re: find the last snapshot with powershell

The way I've handled this in the past is to sort by the id as those are created in sequence. The greatest snapshot id will be the latest snapshot.

Get-NSSnapshot -vol_name Volume1 | Sort-Object -Property id | Select-Object -Last 1

olivier_girard1
Occasional Visitor

Re: find the last snapshot with powershell

ths is working 100%. Nimble could return all properties (inl. dates and so).

Now working forward on my scripts =)

(after finding snapshot, now cloning and mountng)