Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
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!
View By:
2 REPLIES 2
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
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