cancel
Showing results for 
Search instead for 
Did you mean: 

pre/post script doesn't work with powershell

DanyaUser
Level 2

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

Danyauser

6 REPLIES 6

Sush---
Level 6
Employee Accredited Certified

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

 

Thanks,

-Sush...

Ken_Putnam
Level 6

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

pkh
Moderator
Moderator
   VIP    Certified

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
Level 2

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
Moderator
Moderator
   VIP    Certified

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
Moderator
Moderator
Employee Accredited Certified

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