-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Apr 21, 2011 7:37 pm
- Contact:
Retreive VM failure or warning info via Powershell
Using powershell, is it possible to pull VM failure or warning info from a job? See screenshot for an example:
-
- Chief Product Officer
- Posts: 31754
- Liked: 7259 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Retreive VM failure or warning info via Powershell
Hi, no I don't believe this is possible with PowerShell cmdlets we have. Thanks.
-
- Veteran
- Posts: 282
- Liked: 26 times
- Joined: Nov 10, 2010 6:51 pm
- Full Name: Seth Bartlett
- Contact:
Re: Retreive VM failure or warning info via Powershell
Once again, another non-supported method. But if you really need this data:
You get $Session by doing Get-VBRBackupSession. This will allow you what you need. You can do $info |Gm and then if you want to do any of the methods/properties, you will want to do $info[0] as it is an array of objects.
Code: Select all
$Info = [Veeam.Backup.Core.CBackupTaskSession]::GetByJobSession($session.id)
$Info[0].Reason
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
-
- Novice
- Posts: 9
- Liked: 1 time
- Joined: Nov 03, 2017 6:02 am
- Full Name: Pawel Jarpsz
- Contact:
Re: Retreive VM failure or warning info via Powershell
Hi,
Necroposting here but hey why not - seems like "[Veeam.Backup.Core.CBackupTaskSession]::GetByJobSession" does not work anymore, am I right? I look for a quick way to get the warning message for the last backup as this
takes long time to run.
Any ideas how to get this by not going through all of the sessions but just to see session info for one particular backup job?
J
Necroposting here but hey why not - seems like "[Veeam.Backup.Core.CBackupTaskSession]::GetByJobSession" does not work anymore, am I right? I look for a quick way to get the warning message for the last backup as this
Code: Select all
$vbrsessions = Get-VBRBackupSession | ?{$_.JobType -eq "Backup" -and $_.EndTime -ge (Get-Date).adddays(-1) -and $_.result -eq "warning" }
Any ideas how to get this by not going through all of the sessions but just to see session info for one particular backup job?
J
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retreive VM failure or warning info via Powershell
Hi Pawel,
I have just tested this method in v11 and it has worked. What is it you are trying to do precisely? You know exactly that your last job session finished with warning and you are seeking to get this session? Or are you trying to get the latest session with warning without knowing which one is it?
Thanks,
Oleg
I have just tested this method in v11 and it has worked. What is it you are trying to do precisely? You know exactly that your last job session finished with warning and you are seeking to get this session? Or are you trying to get the latest session with warning without knowing which one is it?
Thanks,
Oleg
Who is online
Users browsing this forum: No registered users and 2 guests