Find Sessions with specific transport mode

PowerShell script exchange

Find Sessions with specific transport mode

Veeam Logoby LeoKurz » Fri Oct 02, 2015 11:25 am

Hi,

is there a way to find sessions with a specific transport mode (e.g. lan)? I have VEEAM One reporting some backups done by lan mode and I'd like to find out which vms/disks are backed up in this mode.

Thanx
__Leo
LeoKurz
Veeam ProPartner
 
Posts: 22
Liked: 6 times
Joined: Wed Mar 16, 2011 8:36 am
Full Name: Leonhard Kurz

Re: Find Sessions with specific transport mode

Veeam Logoby v.Eremin » Fri Oct 02, 2015 11:45 am

Should it be only last sessions of given jobs or sessions from a specific time interval?
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Find Sessions with specific transport mode

Veeam Logoby LeoKurz » Mon Oct 05, 2015 10:18 am

First would be good, second perfect :-)

__Leo
LeoKurz
Veeam ProPartner
 
Posts: 22
Liked: 6 times
Joined: Wed Mar 16, 2011 8:36 am
Full Name: Leonhard Kurz

Re: Find Sessions with specific transport mode

Veeam Logoby v.Eremin » Mon Oct 05, 2015 10:39 am

If you want to query only latest job sessions, you need to write something like this:

Code: Select all
Asnp VeeamPSSnapin
$NBDSessions = $Null
foreach ($Job in (Get-VBRJob | where {$_.JobType -eq "Backup"}))
{
$LastSession  = $Job.FindLastSession()
$NBDSessions = $NBDSessions + (Get-VBRTaskSession -Session $LastSession | where {$_.Logger.GetLog().updatedrecords.title -like "*nbd*"})
}
$NBDSessions | select @{N="Job Name";E={$_.JobName}}, @{N="VM Name";E={$_.Name}}, @{N="NBD diks";E={($_.Logger.GetLog().updatedrecords.title | where {$_ -like "*nbd*"})}} | ft -AutoSize


Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: Google [Bot] and 5 guests