Im trying to use the attached script file to log an event into the Windows Event Logs when the last previous version was more than 3 days old.
Im guessing I will need to add an IF statement in with something along the lines of.
if $Object.LatestShadowCopy lt (get-date).adddays 3 Write-EventLog Application -Source “VSS Monitoring” -EventId 0 -Message “No Shadow Copies created recently” -EntryType error
But im a bit clueless how to format this correctly in the script.
Any advice would be greatly appreciated.