PowerShell script exchange
Post Reply
sidavid
Enthusiast
Posts: 48
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

All Backup EndTime Date

Post by sidavid »

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
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: All Backup EndTime Date

Post by Sethbartlett » 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.
sidavid
Enthusiast
Posts: 48
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

Re: All Backup EndTime Date

Post by sidavid »

Thanks

Where can I find the date of the last successful date, the date I find when I double-click on the job?
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: All Backup EndTime Date

Post by Sethbartlett » 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.
sidavid
Enthusiast
Posts: 48
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

Re: All Backup EndTime Date

Post by sidavid »

Thanks, this is exactly what I'm looking for
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests