Dear all.
I need create a CSV file with this structure below
CLIENT; JOB NAME; DATE; LOCATION; TYPE
host1; Job Production; 2023-09-27 10:20:39; Reposiotory 1; Full
host1; Job Production; 2023-09-26 09:13:23; Repository 1; Incr
host2; Job Development; 2023-09-27 11:31:39; Scale-out; Incr
Someone have an example of PowerShell script to share with me
-
- Novice
- Posts: 3
- Liked: never
- Joined: Aug 18, 2022 5:38 pm
- Full Name: Marcio Yotumoto
- Contact:
-
- Veeam Software
- Posts: 2021
- Liked: 673 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Report all backup from client
Hi,
Here is the sample script for last session for each job:
I have separate properties for incremental, full and active fulls in the script as they are calculated separately.
Date property corresponds to the last session's end time.
Let me know if it helps.
Best regards,
Oleg
Here is the sample script for last session for each job:
Code: Select all
$server = Get-VBRServer | where {$_.Description -eq 'Backup server'}
$jobs = Get-VBRJob
foreach ($job in $jobs) {
$lastSession = $job.FindLastSession()
$repo = Get-VBRBackupRepository | where {$_.Id -eq $job.TargetRepositoryId}
$job | select @{n='Client';e={$server.Name}}, @{n='JobName';e={$_.Name}}, `
@{n='Date';e={$lastSession.EndTime}}, @{n='Location';e={$repo.Name}},
@{n='Type';e={$lastSession.Info.JobAlgorithm}}, @{n='IsActiveFull';e={$lastSession.Info.IsActiveFullMode}}, @{n='FullMode';e={$lastSession.Info.IsFullMode}}
}
Date property corresponds to the last session's end time.
Let me know if it helps.
Best regards,
Oleg
Who is online
Users browsing this forum: Baidu [Spider] and 17 guests