Application Integration
1748181 Members
3305 Online
108759 Solutions
New Discussion юеВ

find the last snapshot with powershell

 
SOLVED
Go to solution
olivier_girard1
Occasional Contributor

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 2
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 Contributor

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)