Unable to run the backup mode powershell script unless it is run from the Enterprise Vault (EV) installation directory.
Problem
Unable to run the backup mode PowerShell script unless it is run from the EV installation directory.
Error Message
A procedure imported by 'EVManagedLibrary, Version=9.0.X.0, Culture=neutral,
PublicKeyToken=26c5e2ccf2b9267c' could not be loaded.At line:1 char:31
It then summarises the command followed by:
FileLoadException+FullQualifiedErrorId :
System.IO.FileLoadException,Symantec.EnterpriseVault.PowerShell.Commands.SetVaultStoreBackupMode.
or
Set-VaultStoreBackupMode : Failed to find for : EVSITE using site ID: 1A5A4CFCE393BCC408F997E571B63F9251d10000evsrv. Error: Retrieving the COM class factory
for component with CLSID {4EC6FF78-C97A-11D1-90E0-0000F879BE6A} failed due to the following error: 8007007f.
At line:1 char:28
+ & {set-vaultstorebackupmode <<<< -Name 'EVSITE' -evserver evsrv -evobjecttype vaultstoregroup}
+ CategoryInfo : ObjectNotFound: (Symantec.Enterp...StoreBackUpMode:SetVaultStoreBackUpMode)
[Set-VaultStoreBackupMode], DirectoryServiceReadRecordException
+ FullyQualifiedErrorId : DirectoryRecordNotFound,Symantec.EnterpriseVault
.PowerShell.Commands.SetVaultStoreBackUpMode
Cause
If a different version of EVRT.dll exists in another location on the server, (where that path is located in the PATH environment variable) then this different version of EVRT.dll may be referenced instead of the one located in the EV installation directory.
Solution
Identify the correct version of the 'EVRT.dll' located in the EV installation directory. (Default: c:\Program Files (x86)\Enterprise Vault\) Open the properties of this file and review the 'Product version' under the details tab.
1. Search the Enterprise Vault Server for alternate copies of the EVRT.dll
2: If there are additional copies of the EVRT.dll found in any locations, other than under the EV installation directory or its sub-folders, check the file versions of these files. For any copy of EVRT.dll that does not match the version of EVRT.dll found in the installation directory, determine what component of Enterprise Vault this incorrect EVRT.dll belongs to and upgrade that component to match the installation directory version. For example if 'Enterprise Vault Reporting' is installed on the Enterprise Vault server there will be copies of EVRT.dll found in two directories:
C:\Program Files (x86)\Enterprise Vault\evreports
C:\Program Files\Microsoft SQL Server\MSRS10_50.COMPANION\Reporting Services\ReportServer\bin
The one located in 'C:\Program Files (x86)\Enterprise Vault\evreports' will likely be the same version as the one found in 'C:\Program Files (x86)\Enterprise Vault'. However if the 'Enterprise Vault Reports Configuration' has not been run after an upgrade then the version in the '...\ReportServer\bin' folder will be a previous version. In this example run the 'Enterprise Vault Reports Configuration' to resolve the issue.
Finally test the backup script or run the Enterprise Vault Backup Agent again and confirm that the issue is resolved.