Hi!
I am new to Veeam powershell. We have Veeam Backup & Replication 11.0.1.1261 P20220302. I am using Get-VBRJob command to get a bakcup job. The job contains multiple virtual machine backups. If I get a Warning as a job last result, I would like to know, wich virtual machine caused the result. Is this possible?
thanks
-
- Novice
- Posts: 5
- Liked: never
- Joined: Apr 20, 2020 10:17 am
- Full Name: Peter Brogyanyi
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: get backup job item status
Hi Peter,
To get the virtual machine name that caused the warning, you need to query task sessions of the last backup session:
$taskSession.Name will be equal to the name of a virtual machine.
Best regards,
Oleg
To get the virtual machine name that caused the warning, you need to query task sessions of the last backup session:
Code: Select all
$job = Get-VBRJob -Name 'Job Name'
$lastSession = Get-VBRBackupSession | where {$_.JobId -eq $job.Id} | sort -Property EndTime | select -Last 1
$taskSession = Get-VBRTaskSession -Session $lastSession | where {$_.Status -like $lastSession.Result}
$taskSession
Best regards,
Oleg
-
- Novice
- Posts: 5
- Liked: never
- Joined: Apr 20, 2020 10:17 am
- Full Name: Peter Brogyanyi
- Contact:
Re: get backup job item status
Thank you it's working like miracle
Who is online
Users browsing this forum: No registered users and 17 guests