All Backup EndTime Date

PowerShell script exchange

All Backup EndTime Date

Veeam Logoby sidavid » Sun May 27, 2012 11:57 pm

Hi,
I'm looking a script to get all backup with a specific EndTime.

I have tried but how to specify a date
Code: Select all
$jobName = "JOBNAME"
$job = Get-VBRJob | ?{$_.Name -eq $jobName}
Get-VBRBackupSession | ?{$_.JobId -eq $job.Id} | select JobName, EndTime

Thanks in advance
sidavid
Enthusiast
 
Posts: 60
Liked: never
Joined: Sun Jan 01, 2006 1:01 am

Re: All Backup EndTime Date

Veeam Logoby Sethbartlett » Tue May 29, 2012 1:07 pm 1 person likes this post

Code: Select all
$date = Get-Date -Month 4 -Day 20 -year 2012
Get-VBRBackupSession | ?{$_.jobId -eq $job.id -and $_.EndTime.ToShortDateString() -eq $date.ToShortDateString()}
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: All Backup EndTime Date

Veeam Logoby sidavid » Thu May 31, 2012 4:42 pm

Thanks

Where can I find the date of the last successful date, the date I find when I double-click on the job?
sidavid
Enthusiast
 
Posts: 60
Liked: never
Joined: Sun Jan 01, 2006 1:01 am

Re: All Backup EndTime Date

Veeam Logoby Sethbartlett » Thu May 31, 2012 5:38 pm 1 person likes this post

Code: Select all
$Job = Get-VBRJob -name "Name of Job"
$Job.FindLastSession().EndTime
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: All Backup EndTime Date

Veeam Logoby sidavid » Thu May 31, 2012 11:17 pm

Thanks, this is exactly what I'm looking for
sidavid
Enthusiast
 
Posts: 60
Liked: never
Joined: Sun Jan 01, 2006 1:01 am


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 14 guests