UNSOLVED

DELL-Bill Gr

updated

15 years ago

0

5245

November 21st, 2011 11:00

Powershell - Script to check replay status

This post has been copied from the former Compellent User Forum and placed here for your reference.  This code is made available AS IS, without warranty of any kind.  The entire risk of the use or the results from the use of this code remains with the user.

Script to check replay status – Originally posted By MichaelGraff, 14 May 2010

MichaelGraff - Hi there,

I'm trying to figure out a way to generate a list of all my volumes and what replays exist for each volume.

The goal here is come up with some sort of a daily report that shows that all the replays from the previous night were successful, kind of like a daily "backups report".

Anyone got a script already written for this?

jbraun - $conn = Get-SCConnection -HostName "sctest" -User Admin

foreach($volume in $(Get-SCVolume -Connection $conn))

{

 $volume.Name

 $volreplays = Get-SCReplay -SourceSCVolume $volume -Connection $conn | where {$_.State -eq "Frozen"} | Sort-Object $_.CreateTime -Descending

 if($volreplays.count -gt 0)

 {

  foreach($replay in $volreplays)

  {

   "-----> $($replay.CreateTime)"

  }

 }

}

MichaelGraff - Thank you very much I will give it a try!