Quick Powershell Question

PowerShell script exchange

Quick Powershell Question

Veeam Logoby smithjamesp55 » Thu Feb 24, 2011 4:03 pm

Is there such a thing as a "QUICK" Powershell question?? Anyway, I'm trying to use PS to extract a list of sessions that started within the past day. I think I've got the command down, except, I can't find the object name for the column with the display name of "Start Time" in Get-VBRBackupSession so the line returns nothing. What is that object name?

Here's the command so far:

Code: Select all
Get-VBRBackupSession | where-object {$_.StartTime -gt (get-date).AddDays(-1)}


Thanks!
James
smithjamesp55
Influencer
 
Posts: 15
Liked: never
Joined: Thu Jan 27, 2011 11:09 pm
Full Name: James Smith

Re: Quick Powershell Question

Veeam Logoby Alexey D. » Fri Feb 25, 2011 8:59 am

Hello James,

I will post back after consulting with devs.
Alexey D.
 

Re: Quick Powershell Question

Veeam Logoby Alexey D. » Fri Feb 25, 2011 9:34 am

The property name is "Info.CreationTime"
Code: Select all
Get-VBRBackupSession | where {$_.Info.CreationTime -gt (get-date).AddDays(-1)}

It appears that you can always explore inner structure of an object by executing:
Code: Select all
<something> | gm
Alexey D.
 

Re: Quick Powershell Question

Veeam Logoby smithjamesp55 » Fri Feb 25, 2011 2:43 pm

Thanks. when I run the command above, it returns the results I'm expecting.
smithjamesp55
Influencer
 
Posts: 15
Liked: never
Joined: Thu Jan 27, 2011 11:09 pm
Full Name: James Smith


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests