Forum Discussion

apomazkin's avatar
apomazkin
Level 5
12 years ago

how to create working PS script?

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
  • 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.

6 Replies

  • 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.

  • 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.

     

  • 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,

  • 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.

  • 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.