Video Screencast Help

pre/post script doesn't work with powershell

Created: 31 Aug 2011 | 6 comments

hello symantec

I have Enterprise Vault server 9 which I want to backup with backup exec R2 2010.

Before the backup job begin I need to put the EV in backup mode with power shell script.

The script is working fine when I run it from the backup exec server but when I enter it in the Pre/Post commands It's doesn't work.

I think is the way I wrote it in the line:

Pre :  \\backup-exec-server\c$\prescript.bat

Post: \\backup-exec-server\c$\postscript.bat

please help me


Comments 6 CommentsJump to latest comment

Sush...'s picture

Instead of using the pre-post commad as:

Pre :  \\backup-exec-server\c$\prescript.bat

Post: \\backup-exec-server\c$\postscript.bat

Try putting it in Backup Exec as follows:

Pre :  c:\prescript.bat

Post: c:\postscript.bat



Hope this piece of Information Helps you... and if it does then mark this response as Solution....!!!

Ken Putnam's picture

When the Pre and Post commands run, there are no envirumental variable set, so you have no path

In your scripts, either set a path with the path command, or  use absolute paths for all commands

If this response answers your concern, please mark it as a "solution"

pkh's picture

You should put the scripts in the BE installation directory.  BEMCMD needs a lot of the dll's that are in the BE installation directory.  Putting the scripts in any other location would require to add the BE installation directory in the global path environment variable.

DanyaUser's picture

I tried all what you said but it still doesn't work, the Pre/Post command is:

"\\backup-server\c$\Program Files\Symantec\Backup Exec\scripts\EVbackup\setscript.bat"

the lines in the script are:

PowerShell -noexit "invoke-command -computername "EV-Server" -filepath set.ps1"

and the lines in the PS1 file are:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" set-vaultstorebackupmode 'MailboxVaultStore' evserver vaultstore

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" set-indexlocationbackupmode evserver

Please Help ME !!!! surprise

pkh's picture

1) Logon to the media server with the BE logon account, i.e. the account that is going to run the job.

2) use a command and go to \Program Files\Symantec\Backup Exec

3) run your script.  It must be able to run correctly before you can use the script for either the pre-/post- commands.

Colin Weaver's picture

I kind of question why you are not looking at the EV Agent for Backup Exec which handles that process for you?