12-08-2012 04:21 AM
Hello,
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.
Thanks!
Solved! Go to Solution.
12-09-2012 08:50 AM
here's a SQL script to get you the backup mode of your vault stores:
use EnterpriseVaultDirectory
select VaultStoreName from VaultStoreEntry
where VaultStoreStatus = 2
12-08-2012 04:31 AM
This is from a previous post of mine....
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
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?
12-08-2012 05:34 AM
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.SnapinPS 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.AdminAdd-PSSnapin : The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on thismachine.At line:1 char:13+ Add-PSSnapin <<<< Microsoft.Exchange.Management.PowerShell.Admin+ CategoryInfo : InvalidArgument: (Microsoft.Excha...owerShell.Admin:String) [Add-PSSnapin], PSArgumentException+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommandPS C:\Program Files\Microsoft\Exchange Server\bin>
12-08-2012 05:51 AM
i think your problem with doing it that way is EV is 32bit and Exchange is 64bit
12-08-2012 05:55 AM
So, what should be the solution?
12-08-2012 06:05 AM
after you're done with the EV snapin, load the 64bit powershell again in your script and then call the Exchange snapin
12-08-2012 07:07 AM
Please, could you detail this part because I am not sure whatI have to do, thanks!
12-08-2012 07:54 AM
12-08-2012 08:15 AM
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
12-09-2012 06:34 AM
@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?
12-09-2012 08:50 AM
here's a SQL script to get you the backup mode of your vault stores:
use EnterpriseVaultDirectory
select VaultStoreName from VaultStoreEntry
where VaultStoreStatus = 2
12-09-2012 12:14 PM
Thanks AndrewB and Rob.Wilcox!
12-17-2012 12:59 PM
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.