PowerShell script exchange
Post Reply
smithjamesp55
Influencer
Posts: 15
Liked: never
Joined: Jan 27, 2011 11:09 pm
Full Name: James Smith
Contact:

Quick Powershell Question

Post by smithjamesp55 »

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

Alexey D.

Re: Quick Powershell Question

Post by Alexey D. »

Hello James,

I will post back after consulting with devs.

Alexey D.

Re: Quick Powershell Question

Post by Alexey D. »

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

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

Re: Quick Powershell Question

Post by smithjamesp55 »

Thanks. when I run the command above, it returns the results I'm expecting.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests