Video Screencast Help
Search Video Help Close Back
to help

how to create working PS script?

Created: 16 Nov 2012 | Updated: 27 Jan 2013 | 6 comments
apomazkin's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

in normal services i can load powershell's module to Add-PSSnapin commandlet.

example: Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin -ErrorAction SilentlyContinue

and so forth.

how can i load Symantec.EnterpriseVault.PowerShell.Snapin?

i'd try: 

PS C:\Users\sev> Add-PSSnapin Symantec.EnterpriseVault.PowerShell.Snapin

and i get:

 

PS C:\Users\sev> Add-PSSnapin Symantec.EnterpriseVault.PowerShell.Snapin
Add-PSSnapin : The Windows PowerShell snap-in 'Symantec.EnterpriseVault.PowerShell.Snapin' is not installed on this mac
hine.
At line:1 char:13
+ Add-PSSnapin <<<<  Symantec.EnterpriseVault.PowerShell.Snapin
    + CategoryInfo          : InvalidArgument: (Symantec.Enterp...werShell.Snapin:String) [Add-PSSnapin], PSArgumentEx
   ception
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

Comments 6 CommentsJump to latest comment

ZeRoC00L's picture

On 64-bit Windows operating systems, you must run the Enterprise Vault PowerShell snap-in under the 32-bit version of PowerShell.  See the manual.

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

SOLUTION
0
Login to vote
  • Actions
FreKac2's picture

Also, if it still doesn't work, try and run the Enterprise Vault Management Shell from the start menu once before you try to load the snapin.

 

0
Login to vote
  • Actions
Rob.Wilcox's picture

Here is how I just set things up, and tested with get-indexlocationbackupmode:

 

You have got to launch the x86 version of powershell from:

c:\windows\syswow64\WindoesPowerShell\v1.0

 

Navigate from that shell to the EV folder:

cd "\program files (x86)\enterprise vault"

 

Add the snapin

add-pssnapin Symantec.EnterpriseVault.PowerShell.Snapin

 

Run some stuff, eg

get-indexlocationbackupmode -evservername ev1a.ev.local

 

Hope that helps,

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

0
Login to vote
  • Actions
apomazkin's picture

Than you, Rob!

Thank you, all!

i didn't use "cd "\program files (x86)\enterprise vault"", i'll try.

but this 32bit implementation is very uncomfortable for me.

i used to create file and simply add snapins and write a code.

0
Login to vote
  • Actions
Rob.Wilcox's picture

No problem. I guess if you add the EV install folder to the path, you would just be able to add it as you described.

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

0
Login to vote
  • Actions
Rob.Wilcox's picture

Is there anything else needed with this issue?

Many Thanks,

Rob

www.quadrotech-it.com - All your EV Tools

PS I hope that the post proves helpful.

0
Login to vote
  • Actions