Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

psexec to execute remote powershell EV cmdlets

Updated: 22 May 2010 | 5 comments
Ryujin's picture
0 0 Votes
Login to vote

Does anyone have experience invoking the EV powershell cmdlets on a remote server via psexec?

A command such as the following will work without problems:

psexec \\evserver cmd /c "echo . | powershell  -psconsolefile ^"C:\Program Files\Enterprise Vault\EVShell.psc1^"  get-command -pssnapin symantec.enterprisevault.powershell.snapin"

Loading the pconsolefile to invoke an EV cmdlet does not work. So what I am trying to do is of the following format:

psexec \\evserver cmd /c "echo . | powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command  "&  {Get-IndexLocationBackUpMode EV8}""

I have used innumerable permutations of escape characters: carat, double quote, single quote, etc. to try to find the magic combination. Invariably an error message resembling the following comes back:

'{Get-IndexLocationBackUpMode' is not recognized as an internal or external command, operable program or batch file. cmd exited on ev with error code 1.

It seems to have problems passing the ampersand to the remote server. It would be nice to have the EV8 snapin permanently registered so I don't need to load the psc1 file.

BTW, I have verified the state described in Symantec support document 319181. So the registry reflects the snapin.

Thoughs? Experience?

Thank you!!!

Comments

Ryujin's picture
15
May
2009
0 Votes 0
Login to vote

Powershell V2

BTW, I am fully aware PowerShell V2 supports remoting. However, these are Windows 2003 servers, not 2008, so those functions are not available...

Microsoft has discussed the limitations here.

MichelZ's picture
16
May
2009
0 Votes 0
Login to vote

Hope this is not a stupid

Hope this is not a stupid question, but *why* do you want to execute it remote?

Cheers

www.quadrotech-it.com - All your EV Tools | www.techfreak.ch

NilsV's picture
16
Jul
2009
0 Votes 0
Login to vote

One reason

One reason I can think of is when you have multiple servers running EV, and want a consistent back-up.

Not all back-up applications can coordinate a backup of filesystems and sql, so you would need to quiesce EV when you begin *anything* and resume when you have backed-up *everything*

Paul Grimshaw's picture
16
Jul
2009
1 Vote +1
Login to vote

Does this

Does this help?
http://support.veritas.com/docs/312327

EV Backline Technical Support Engineer APJ Region

jz81's picture
20
Aug
2009
0 Votes 0
Login to vote

Hello, I'm not sure why you

Hello,

I'm not sure why you are using the ampersand and curly braces (to invoke a script-block containing only one command).

I think this should work ...

psexec \\evserver cmd /c "echo . | powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command  "Get-IndexLocationBackUpMode EV8""

Alternatively the following should also work (if you have a script-block containing more than one command) ...

psexec \\evserver cmd /c "echo . | powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command  "invoke-expression 'Get-IndexLocationBackUpMode EV8'""

or

psexec \\evserver powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command  "Get-IndexLocationBackUpMode EV8"

Is this working for you?
Best regards,

John