When attempting to run the Enterprise Vault PowerShell snap-in through a Command Prompt or a Batch Shell Script a Warning that the snap-in could not be loaded is generated

Article:TECH67075  |  Created: 2009-01-23  |  Updated: 2014-06-16  |  Article URL http://www.symantec.com/docs/TECH67075
Article Type
Technical Solution


Environment

Issue



When attempting to run the Enterprise Vault PowerShell snap-in through a Command Prompt or a Batch Shell Script a Warning that the snap-in could not be loaded is generated


Error



WARNING: The following errors occured when loading console C:\Program Files (x86)\Enterprise Vault\EVShell.psc1:
Cannot load Windows PowerShell snap-in Symantec.
EnterpriseVault.PowerShell.Snapin because of the following error: No Windows PowerShell Snap-ins are available for version 1.


Cause



This issue could be caused due to the "Symantec.EnterpriseVault.PowerShell.Snapin.dll" being a 32-bit PowerShell Snap-In, and the default Powershell.exe is the 64-bit version.  Attempting to run the following command would produce the above warning (modified slightly from Page 11 of the "Backing up Enterprise Vault: 8.0 and later" guide):

PowerShell -PSConsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name 'Vault Store Group' -EVServerName server1 -EvObjectType VaultStoreGroup}"


Solution



To resolve this issue the 32-bit version of PowerShell needs to be explicitly used in the command, therefore the above command would need to be modified as follows:
 
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe -PSConsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name 'Vault Store Group' -EVServerName server1 -EvObjectType VaultStoreGroup}"



Legacy ID



318009


Article URL http://www.symantec.com/docs/TECH67075


Terms of use for this information are found in Legal Notices