Quantcast
Channel: R&D Forums
Viewing all articles
Browse latest Browse all 9994

PowerShell • Re: Veeam powershell colume?code?

$
0
0
I used next script. (ps1)

Code:

$TaskSessions = @()$sessions = Get-VBRComputerBackupJobSession | Where-Object{$_.CreationTime -ge (Get-Date).AddDays(-$day)}foreach ($session in $sessions) {  $TaskSessions += Get-VBRTaskSession -Session $session | Select-Object -Property Jobname,@{n='Job';e={$_.JobTypeString}},@{n='Result';e={$_.Status}},@{n='StartTime';e={$_.Progress.StartTimeLocal}},@{n='EndTime';e={$_.Progress.StopTimeLocal}},@{n='Backup MB';e={[math]::Round(($_.Progress.TransferedSize/1024/1024))}} }$TaskSessions | Sort -Property JobName, StartTime -Descending | Format-Table -Autosize >> $reportdir\report-$dt.csv
[result]

Code:

JobName                       Result StartTime             EndTime               Backup MB-------                       ------ ---------             -------               ---------restore point - 192.168.0.40 Success 2024-04-17 오후 3:21:03 2024-04-17 오후 3:23:24      2476restore point - 192.168.0.40 Success 2024-04-17 오후 3:00:33 2024-04-17 오후 3:02:56         0restore point - 192.168.0.40 Success 2024-04-17 오후 2:11:51 2024-04-17 오후 2:14:11      2476restore point - 192.168.0.40 Success 2024-04-17 오후 1:14:42 2024-04-17 오후 1:19:07      9499
[TO-BE]

Code:

JobName                                 Result        StartTime                           EndTime                            Backup MB    JobType-------                       ------ ---------             -------               ---------restore point - 192.168.0.40     Success     2024-04-17 오후 3:21:03     2024-04-17 오후 3:23:24      2476             fullrestore point - 192.168.0.40     Success     2024-04-17 오후 3:00:33     2024-04-17 오후 3:02:56         0                incrementalrestore point - 192.168.0.40     Success     2024-04-17 오후 2:11:51     2024-04-17 오후 2:14:11      2476              fullrestore point - 192.168.0.40     Success     2024-04-17 오후 1:14:42     2024-04-17 오후 1:19:07      9499              full
i need column intervel , and Jobtype add

Statistics: Posted by shahn — Apr 22, 2024 4:08 am



Viewing all articles
Browse latest Browse all 9994

Latest Images

Trending Articles



Latest Images