PowerShell script exchange
Post Reply
ics
Influencer
Posts: 21
Liked: 3 times
Joined: May 13, 2015 10:20 am
Full Name: ICS
Contact:

get-vbrjobobject give different name results

Post by ics »

Hi all,

need your help with this. if I do this:
get-vbrjob | get-vbrjobobject | select name

I get some name like this:

servername.ad.cmp... or ....

If I do this

get-vbrjob -name "jobname" | get-vbrjobobject | select name

The name is correct like this: servername.ad.cmp.com!

Powershell 5 on windows 2008r2, veeam 9.5.0.1038


thx

Ralph
ics
Influencer
Posts: 21
Liked: 3 times
Joined: May 13, 2015 10:20 am
Full Name: ICS
Contact:

Re: get-vbrjobobject give different name results

Post by ics »

Hi

get-vbrjobobject -job "jobname" | select name also give the wrong names.

It look like name length >25 is the problem!

But why works one command pipe correct?


br

Ralph
ics
Influencer
Posts: 21
Liked: 3 times
Joined: May 13, 2015 10:20 am
Full Name: ICS
Contact:

Re: get-vbrjobobject give different name results

Post by ics »

fu powershell

get-vbrjob | get-vbrjobobject | select name | ft -autosize

help me in thise case...


br

Ralph
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: get-vbrjobobject give different name results

Post by veremin »

get-vbrjobobject -job "jobname" | select name also give the wrong names.
What happens if you set parameter of job type, instead of string object. Try this example:

Code: Select all

$Job = Get-VBRJob -name "Name of your Backup Job" 
Get-VBRJobObject -Job $Job | select name
Thanks.
ics
Influencer
Posts: 21
Liked: 3 times
Joined: May 13, 2015 10:20 am
Full Name: ICS
Contact:

Re: get-vbrjobobject give different name results

Post by ics »

Yes that works too.
My first version works over years with powershell v4. I think v5 make something different.


thx

Ralph
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: get-vbrjobobject give different name results

Post by veremin »

I've seen number of strange issues caused by PowerShell 2.0 (default PS version on Windows 2008R2), but never experienced something similar with its higher versions.

Anyway, good to know that the script is now working smoothly.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests