Forum Discussion

Peable's avatar
Peable
Level 6
16 years ago

Powershell errors

Hi there,

I've read the article about "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" dozen of times.

I have a server Win2003 SP2 R1 and Powershell installed. This is very much a 32bit system, so the article above does not apply.

When executing the command:
C:\Documents and Settings\user>powershell -psconsolefile "E:\Program Files\Enterprise Vault\EVShell.psc1" -command "& {set-vaultstorebackupmode -name 'VaultStoreGroup01' -evservername evserver01 -evobjecttype vaultstoregroup}" WARNING: The following errors occurred when loading console E:\Program Files\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. ...

I can execute from the windows\system32\windowspowershell\v1.0\ directory or whereever. It's always the same error. No Windows PowerShell Snap-ins are available for version 1.

Any ideas?
Thanks, Jochen.

  • So, I got it to work: I had to add the EV Powershell AddIn to Powershell. I got the hint from this article!

    C:\Documents and Settings\%user%>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "C:\Program Files\Enterprise Vault\Symantec.EnterpriseVault.PowerShell.Snapin.dll"

    Afterwards, I did have the registry value as Lerxst pointed out. Afterwards, the Enterprise Vault Management Shell starts... and the scripts before/after backup work!

    Everything is kind of slow when starting Powershell or the EV Mgt Shell, but this is a Powershell issue.

    Just to let you guys know,
    Jochen.

  • Hi Tony,

    thanks, but in applying this article, I run into the error. I have broken up this command, verified every part... I always run into the same error.

    What I find funny, when opening the Enterprise Vault Management Shell, I never see anything... the window just stays black! - When having run the Deployment Scanner before the installation (and now afterwards), this check has always passed successfully!

    Any further ideas?

    Regards, Jochen.

  • I wonder if you need to add E:\program files\enterprise vault to the environmental variables.

    Long shot, I know.  :) 

  • Do you have this registry key?

    HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Symantec.EnterpriseVault.PowerShell.Snapin

  • Hi Lerxst,

    no, I don't have this entry...  my registry shows up to
    HKLM\SOFTWARE\Microsoft\PowerShell\1\

    and is not even showing PowerShellSnapins... Is Symantec.EnterpriseVault.PowerShell.Snapin a key? Are there any values there?

    I might just try addid this manually.

    Thanks, Jochen.

  • So, I got it to work: I had to add the EV Powershell AddIn to Powershell. I got the hint from this article!

    C:\Documents and Settings\%user%>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "C:\Program Files\Enterprise Vault\Symantec.EnterpriseVault.PowerShell.Snapin.dll"

    Afterwards, I did have the registry value as Lerxst pointed out. Afterwards, the Enterprise Vault Management Shell starts... and the scripts before/after backup work!

    Everything is kind of slow when starting Powershell or the EV Mgt Shell, but this is a Powershell issue.

    Just to let you guys know,
    Jochen.

  • I added PowerShellSnapIn as a key but am unsure of the next step....
    So what is the Symantec.EnterpriseVault.PowerShell.Snapin? Is it a key, is there a value?

    Also, what exactly are you doing with this:

    C:\Documents and Settings\%user%>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "C:\Program Files\Enterprise Vault\Symantec.EnterpriseVault.PowerShell.Snapin.dll"

    I can run my ps1 within powershell and put the vault in backup mode if I open up the EVM shell first.....

    Thanks in advance!!

  • you should probably start a new post for your question as this one has been marked solved.