One of the changes that BE 2012 has brought about is the change in the BE commandline interface from BEMCMD to BEMCLI. BEMCLI is based on Powershell which is a more powerful scripting language than the DOS commands. Needless to say, to fully exploit BEMCLI, you got to be familiar with Powershell. There are a lot of books on Powershell and also a lot of resources on the Web that you can refer to.
Preparing your Powershell environment to run BEMCLI and scripts
Created: 02 Apr 2012 • Updated: 14 May 2012 | 7 comments
This article is not for the Powershell expert. This article is for the people who are less familiar with Powershell and just want to use BEMCLI to control BE, either from the command-line or as part of a pre/post command.
BEMCLI requires Powershell v2.0. If you are using Server 2008 R2, then you already have Powershell v2.0.
For earlier OS releases, check whether someone has already loaded Powershell v2.0 by running the BE clilauncher
Start > All Programs > Symantec Backup Exec > Backup Exec Management Command Line Interface
If the clilauncher loads properly, you are good to go. Otherwise, download Powershell v2.0 for your OS from
and install it.
By default, the Powershell execution policy is set to Restricted which means that you cannot run scripts. Depending on the security standards of your installation, you would need to change the execution policy to a less restrictive one. I think RemoteSigned is a good execution policy. It allows you to run unsigned scripts that are written on your machine, but it will only run scripts and configuration files that are downloaded from the Internet (including e-mail and instant messaging programs) which are properly signed with a digital signature from a trusted publisher.
To change your execution policy,
a) run Powershell
Start > All Programs > Accessories > Powershell > Powershell
or start a command prompt and enter powershell.
b) Check your execution policy by entering
c) if necessary, change the execution policy. Enter
If you want to run BEMCLI from a Powershell console or Powershell script, you would need to import the BEMCLI module.
import-module "\program files\symantec\backup exec\modules\bemcli\bemcli"
You can do the import for every Powershell session and script, or do include the import-module command in your profile. If you use the latter method, then the import-module is done automatically. You can decide which profile that you want to modify.
$Profile Current User,Current Host
$Profile.CurrentUserCurrentHost Current User,Current Host
$Profile.CurrentUserAllHosts Current User,All Hosts
$Profile.AllUsersCurrentHost All Users, Current Host
$Profile.AllUsersAllHosts All Users, All Hosts
Edit the appropriate profile and add in the import-module command, e.g.
To see all the BEMCLI cmdlets, you can open the BEMCLI_en.chm file which is found in the BE installation directory. Alternatively, you can enter
get-command -module bemcli
in a Powershell session.
To get details of each BEMCLI, you can enter
get-help <BEMCLI cmdlet>
in a Powershell session, e.g.
Below is an example of a post-command running a BEMCLI cmdlet
c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe start-bejob -i '"Server1 Backup 00005-Backup"' -confirm:$false
Below is an example of a pre-command running a Powershell script from the root directory.
I would encourage you to explore BEMCLI which is a lot more comprehensive and powerful than BEMCMD. If you combine BMECLI with Powershell, you would have a powerful tool to control and report on BE. See my follow-up articles on how to use BEMCLI to start BE jobs and to report on them.
You might also want to enlarge your command prompt window to accommodate wider and longer outputs. Right click on the top left-hand corner of your command prompt window and then select select Defaults. Change the window and buffer sizes like below.
The changes will take effect the next time you start a command prompt.
You may want to read my article on using BEMCLI to chain jobs.
or download my script to import tapes into the first empty slot