Forum Discussion

Vini_Vidi_Insta's avatar
10 years ago

BEMCLI in remote

Hallo everybody,

I would like to deploy some powershell scripts combining with BEMCLI. Currently I have two backup exec servers in two remote offices. On version in 2010 R3 and other version is 2012.

From my computer, I am using Windows server 2012 R2 with  powershell v.4 , with BE 2014 installed (trial version) and I loaded BEMCLI module in my powershell code without errors. I can see all functions included. Now I would like to execute some BEMCLI commands on the remote servers for reading information (for example backup jobs). I tested some comands and fails. I used PSSession for executing BEMCLI functions and fails. I would like to ask if you can help me showing how can I execute a query on remote backup exec.

Last test was this code

 

Import-Module -Name BEMCLI
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB -Value 2048
$session = New-PSSession -ComputerName "NKS-MPS.ingrnet.com"
Invoke-Command -Session $session -ScriptBlock { Get-BEJobHistory }
Remove-PSSession $session

  • BE 2010 R3 is not compatible with BEMCLI (Powershell) as still used an old command line tool that did not use Powershell but was called BEMCMD and had more limited functionality and may not work remotely with newer desktop operating systems (in fact to get it to work remotely at all I think you had to manually copy DLL files

     

    EDIT:

    As BE 2010 R3 is now in partial support (so no more product fixes and support only provides advice against configuration and previously documented issues) then I would recommend upgrading this version (as long as eveything you need to backup is still supported by newer versions). I would also recommend upgarding any 2010 R3 server to BE 2014 and NOT BE 2012, due to the single server per backup job model that BE 2012 enforces
     

  • This is more a question for a Microsoft forum. BEMCLI is using standard Powershell facility and it can be invoked remotely. BEMCLI must exists on the remote server and the import command must be done on the remote server