Forum Discussion

crakeador's avatar
crakeador
Level 3
10 years ago

Backup Exec 2014 BEMCLI - Exception returning data

Hi guys,

 

I am developing some scripts in Powershell and I found a problem using BEMCLI. I have installed a new Backup Exec 2014 from scratch (first was an upgrade from 2012 to 2014). I execute the following code in Powershell

Import-Module BEMCLI
$jobs = Get-BEJob | Where-Object {$_.JobType -eq "Backup"}

Then when I check the information, the atribute "Taskname" returns this

Exception getting "TaskName": "The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter BackupExec.Management.Services:GetSolutionResult. The InnerException message was 'Element 'http://schemas.datacontract.org/2004/07/BackupExec.Management.Objects:TaskDefinition' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/BackupExec.Management.Objects:BackupCustomTaskDefinition'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'BackupCustomTaskDefinition' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details."

 

I a second server following steps I received the correct data insise

D for daily jobs

W for week jobs

I dont understand really the problem. Where the code works I am running W.S 2012 R2 and where it fails is W.S 2008 R2

 

  • OMG, I found why I am receiving this message. I was loading a old BEMCLI version. Apologies.

  • OMG, I found why I am receiving this message. I was loading a old BEMCLI version. Apologies.