PowerShell script exchange
sidavid
Enthusiast
Posts: 48 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » May 27, 2012 11:57 pm
this post
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:
Post
by Sethbartlett » 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.
sidavid
Enthusiast
Posts: 48 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » May 31, 2012 4:42 pm
this post
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:
Post
by Sethbartlett » 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.
sidavid
Enthusiast
Posts: 48 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » May 31, 2012 11:17 pm
this post
Thanks, this is exactly what I'm looking for
Users browsing this forum: No registered users and 15 guests