Application Integration
1752567 Members
5365 Online
108788 Solutions
New Discussion юеВ

Re: 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)