-
- Lurker
- Posts: 1
- Liked: never
- Joined: Dec 20, 2016 6:25 am
- Full Name: Technicien O2 Informatique
- Contact:
Problem when launching the command Get-VBRJob from powershell
Case 04056341
Hello,
I have a warning alert when the following command is launched in powershell : Get-VBRJob ( Powershell version 5.1.14 / OS : Windows Server 2016 / Veeam version : 10 / VeeamPSSnapin version : 5.1) :
"AVERTISSEMENT : This cmdlet is obsolete and no longer supported. To get computer backup job use "Get-VBRComputerbackupJob" instead"
However, when I test it with other OS (please see below), there is no warning message. Do you know why this message is appeared, please ? Thanks in advance.
Tests
- Powershell v5.1.17 / Windows Server 2019 / Veeam version 9.5 / VeeamPSSnapin version : 5.1 ==> Without warning message
- Powershell v5.1.17 / Windows Server 2019 / Veeam version 10 / VeeamPSSnapin version : 5.1 ==> Without warning message
- Powershell v5.1.1' / Windows Server 2016 / Veeam version 10 / VeeamPSSnapin version : 5.1 ==> With warning message
- Powershell v4.0 / Windows Server 2012R2 / Veeam version 10 / VeeamPSSnapin version : 4.0 ==> Without warning message
Hello,
I have a warning alert when the following command is launched in powershell : Get-VBRJob ( Powershell version 5.1.14 / OS : Windows Server 2016 / Veeam version : 10 / VeeamPSSnapin version : 5.1) :
"AVERTISSEMENT : This cmdlet is obsolete and no longer supported. To get computer backup job use "Get-VBRComputerbackupJob" instead"
However, when I test it with other OS (please see below), there is no warning message. Do you know why this message is appeared, please ? Thanks in advance.
Tests
- Powershell v5.1.17 / Windows Server 2019 / Veeam version 9.5 / VeeamPSSnapin version : 5.1 ==> Without warning message
- Powershell v5.1.17 / Windows Server 2019 / Veeam version 10 / VeeamPSSnapin version : 5.1 ==> Without warning message
- Powershell v5.1.1' / Windows Server 2016 / Veeam version 10 / VeeamPSSnapin version : 5.1 ==> With warning message
- Powershell v4.0 / Windows Server 2012R2 / Veeam version 10 / VeeamPSSnapin version : 4.0 ==> Without warning message
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
We've implemented a different cmdlet that returns computer backup policy - Get-VBRComputerBackupJob. In order not to break existing scripts and warn users that in the next releases cmdlet will not return computer backup job, we've added the corresponding warning.
However, current wording seems a bit misleading and leads to certain confusion - so, we will fix it in the Update 1.
Had to say why it pop us only on certain environments, though, you might want to continue investigating it with the support team.
However, if you simply want to skip the warning, use WarningAction parameter with "SilentlyContinue" value.
Thanks!
However, current wording seems a bit misleading and leads to certain confusion - so, we will fix it in the Update 1.
Had to say why it pop us only on certain environments, though, you might want to continue investigating it with the support team.
However, if you simply want to skip the warning, use WarningAction parameter with "SilentlyContinue" value.
Thanks!
-
- Influencer
- Posts: 19
- Liked: 5 times
- Joined: Oct 26, 2017 12:52 pm
- Full Name: Max Kozlov
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
Want to menthion that new cmdlets doesn't have some features that have old.
for example
now I can to quickly get last session of the job
and with I get all sessions which i should sort and select for the same task
I hope such things will be implemented in future
for example
now I can
Code: Select all
(Get-VBRJob 'MyAgentJob').FindlLastSession()
and with
Code: Select all
Get-VBRComputerBackupJobSession
I hope such things will be implemented in future
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
We're moving away from having dynamic methods inside PS classes (not recommended practice). However, having a simple switch for Get-VBRComputerBackupJobSession that returns last session only (say, -Last or something) sounds like a good idea. So, thank you for the suggestion. Thanks!
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
Agree with you, guys! Such switch is also already implemented for Get-VBRSession. So, makes sense to unify it further. Added as a feature request for both Get-VBRBackupSession and Get-VBRComputerBackupJobSession. Thanks!
-
- Influencer
- Posts: 19
- Liked: 5 times
- Joined: Oct 26, 2017 12:52 pm
- Full Name: Max Kozlov
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
So, let me list methods that I use so future cmdlets do not lost this rich functionality
Code: Select all
$backoup.FindChildBackups()
$backup.GetLastOibs()
$backup.GetLastPoint()
$backup.FindParentJob()
$backup.GetOibsByOriginalIdInBackup()
$job.GetLastBackup()
$job.FindLastSession()
$session.Logger.GetLog().UpdatedRecords.Title
$oib.GetSourceJob()
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Problem when launching the command Get-VBRJob from powershell
I'll keep an eye on your use case and see if we can implement such logic for other .NET methods or find any alternatives in the future. Thanks!
Who is online
Users browsing this forum: No registered users and 11 guests