Microsoft Virtualization Discussions

Getting a snapshot list and comparing it to the snap schedule in Powershell

DANTAYLOR80
2,396 Views

I am trying to look for a way to achieve the following on 7mode systems:

 

For a nominated volume (or even wildcard) check that netapp snapshots exist and exist based on a particular nominated schedule i.e. every hour or every 4 hours and if it doesnt see a snapshot inbetween those periods i.e. within 1 or 4 hours then to highllght this or sumarise at the bottom of report in csv format. 

 

Let me know if you need more info.

 

Cheers

 

 

 

2 REPLIES 2

JGPSHNTAP
2,377 Views

Generally I like people to attempt to write a script with the cmdlets, not just ask.  

 

So, let me get you started a little

 

 

get-nasnapshot | ? {$_.name -like "*blah*"}

 

 

DANTAYLOR80
2,356 Views

Sorry for my ignorance.

 

I can produce a list of snapshots but I guess I need a little intelligience behind a filter to locate snapshots which are more than a defined number of hours apart i.e. more than 2 hours and presenting it in a sensible format.  I guess I'd need to use access or creation time on the snapshots to be able to filter out such things.

 

Seeing as DFM cant give me that I am having to look and learn at powershell so again I apologies for the lack of code input on my post.

 

 

 

 

Public