update 2 powershell property changes?

PowerShell script exchange

update 2 powershell property changes?

Veeam Logoby AlexL » Mon Aug 15, 2016 12:59 pm

I had the unpleasant surprise today after updating to update2 last week that a few scripts that ran fine since at least v7 suddenly had some problems.

two examples:
$jso = Get-VBRJobScheduleOptions -Job "Backup Job 0541"
$jso.StartDateTime
$jso.OptionsDaily.Time

Both properties now return an empty value, apparently the new property names are StartDateTimeLocal and TimeLocal. After changing my code to reflect the new property names these two scripts are working again.

Perhaps I missed this in the release notes but where can I find a complete list of all powershell method/property changes for B&R9 update2?

Thanks,
Alex
AlexL
Enthusiast
 
Posts: 52
Liked: never
Joined: Tue Aug 24, 2010 8:55 am
Full Name: Alex

Re: update 2 powershell property changes?

Veeam Logoby v.Eremin » Mon Aug 15, 2016 6:18 pm

Perhaps I missed this in the release notes but where can I find a complete list of all powershell method/property changes for B&R9 update2?

You didn't miss anything, actually, as such list does not exist.

Generally speaking, we try to avoid changes that might break existing scripts. Though, sometimes it happens unintentionally; so, thank you for finding the inconsistency and posting it here.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: update 2 powershell property changes?

Veeam Logoby AlexL » Mon Aug 15, 2016 8:12 pm

Which leaves me with the uneasy feeling that for the next few months more surprises might pop up in some of our numourous scripts we have as a service provider.
AlexL
Enthusiast
 
Posts: 52
Liked: never
Joined: Tue Aug 24, 2010 8:55 am
Full Name: Alex

Re: update 2 powershell property changes?

Veeam Logoby v.Eremin » Tue Aug 16, 2016 12:40 pm

As I've said, we're doing our best in order to avoid such situations.

However, due to historical reasons (the fact that some of our methods/properties do not PowerShell wrappers and are exposed directly) sometimes it happens regardless of our intentions.

So, I agree with you that there is a room for potential improvement.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests