Microsoft Virtualization Discussions

Snapshots report

seffysefix

Hi,

We would like to set an alert/Email that generates if no new snapshot is created using powerhsell.

Basically, we  want to know if a volume has no snapshots in the last x days, so let's say vol1 has no shopshots in the last 24 hours, we would like to receive and email.

Can anyone please help?

Thanks!

2 REPLIES 2

olson

How about something like this:

$vols = (get-ncvol W2K12SMB3*)|select -expandproperty name

foreach ($v in $vols){

if((get-ncsnapshot $v|?{$_.Created -gt (get-date).AddDays(-1)}).count){

    write-host "volume $v has current snapshots"

    }

}

The Parameters can be tweaked like days or sub na for nc for Legacy.

seffysefix

Hi,

Thanks for the reply.

what I want to achieve via powershell is to have a script run once a day and scan all volumes, then if a volume has no snap shots for more than 1 day, receive an alert.

Thanks

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

Public