Video Screencast Help

Add-Snapin Vault into an Exchange Powershell

Created: 08 Dec 2012 • Updated: 09 Dec 2012 | 11 comments
This issue has been solved. See solution.


I need to make a script which combines both Exchange and Vault cmdlets.

I have got a Vault server (Windows 2003 x64) and an Exchange Server  (Windows 2003 x64).

I want to add the snap-in " Symantec.EnterpriseVault.PowerShell.Snapin" into the Exchange Powershell.

I don't know if it's possible to just copy "Symantec.EnterpriseVault.PowerShell.Snapin.dll" into the Exchange Server, load it and add the snap-in that way, is yes please explain me how.


Discussion Filed Under:

Comments 11 CommentsJump to latest comment

Rob.Wilcox's picture

This is from a previous post of mine....

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


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

Maybe that'll help...

But maybe you'll need to look at remote powershell, rather than trying to add the DLL (which will no doubt rely on many of the other EV binaries) on to your Exchange server?

mistervault's picture

I tried and I am able to add the Vault snapin into the Windows Powershell x86 (ran as admin) : 

However, I am not able to add the Exchange snapin into this same Windows Powershell x86 : 

PS C:\Program Files (x86)\Enterprise Vault> Add-PSSnapin Symantec.EnterpriseVault.PowerShell.Snapin
PS C:\Program Files (x86)\Enterprise Vault> cd "C:\Program Files\Microsoft\Exchange Server\bin"
PS C:\Program Files\Microsoft\Exchange Server\bin> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this
At line:1 char:13
+ Add-PSSnapin <<<<  Microsoft.Exchange.Management.PowerShell.Admin
    + CategoryInfo          : InvalidArgument: (Microsoft.Excha...owerShell.Admin:String) [Add-PSSnapin], PSArgumentEx
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
PS C:\Program Files\Microsoft\Exchange Server\bin>
Consequently, I am not able to add both snapins into the same Powershell.
AndrewB's picture

i think your problem with doing it that way is EV is 32bit and Exchange is 64bit

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

AndrewB's picture

after you're done with the EV snapin, load the 64bit powershell again in your script and then call the Exchange snapin

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

mistervault's picture

Please, could you detail this part because I am not sure whatI have to do, thanks!

AndrewB's picture

the concept is that you have a script.cmd file and within that file you

1. call your x86 powershell from %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe

2. load your EV snapin

3. run your EV cmdlets

4. call your x64 powershell from %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

5. add your Exchange snapin

6. run your Exchange cmdlets

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

JesusWept3's picture

Just as a matter of interest why do you want to do this given the limited functionality of the powershell? (Ie backup mode and partition roll over)

mistervault's picture

@JesusWept3 : in fact, I just want to know if my vault stores are in backup mode.

Maybe it's more easy with a SQL query, does it exist a SQL query to check that?

AndrewB's picture

here's a SQL script to get you the backup mode of your vault stores:

use EnterpriseVaultDirectory
select VaultStoreName from VaultStoreEntry
where VaultStoreStatus = 2

Andy Becker | Authorized Symantec Consultant | Trace3 | Symantec National Partner |

PeterWendell's picture

On my 32 bit Windows 7 workstation I have the Exchange cmdlets set to automatically load in my PS profile (via PS remoting). I have also have the EV Administration Console installed. If I open the 'Enterpsie Vault Management Shell' I have access to the all Exchange and EV cmdlets in the same PS session.