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