how to create working PS script?
Created: 16 Nov 2012 | Updated: 27 Jan 2013 | 6 comments
This issue has been solved. See solution.
in normal services i can load powershell's module to Add-PSSnapin commandlet.
example: Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin -ErrorAction SilentlyContinue
and so forth.
how can i load Symantec.EnterpriseVault.PowerShell.Snapin?
i'd try:
PS C:\Users\sev> Add-PSSnapin Symantec.EnterpriseVault.PowerShell.Snapin
and i get:
PS C:\Users\sev> Add-PSSnapin Symantec.EnterpriseVault.PowerShell.Snapin
Add-PSSnapin : The Windows PowerShell snap-in 'Symantec.EnterpriseVault.PowerShell.Snapin' is not installed on this mac
hine.
At line:1 char:13
+ Add-PSSnapin <<<< Symantec.EnterpriseVault.PowerShell.Snapin
+ CategoryInfo : InvalidArgument: (Symantec.Enterp...werShell.Snapin:String) [Add-PSSnapin], PSArgumentEx
ception
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
Discussion Filed Under:
Comments 6 Comments • Jump to latest comment
On 64-bit Windows operating systems, you must run the Enterprise Vault PowerShell snap-in under the 32-bit version of PowerShell. See the manual.
If this response answers your concern, please mark it as a "solution"
Also, if it still doesn't work, try and run the Enterprise Vault Management Shell from the start menu once before you try to load the snapin.
Here is how I just set things up, and tested with get-indexlocationbackupmode:
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
Hope that helps,
Many Thanks,
Rob
www.quadrotech-it.com - All your EV Tools
PS I hope that the post proves helpful.
Than you, Rob!
Thank you, all!
i didn't use "cd "\program files (x86)\enterprise vault"", i'll try.
but this 32bit implementation is very uncomfortable for me.
i used to create file and simply add snapins and write a code.
No problem. I guess if you add the EV install folder to the path, you would just be able to add it as you described.
Many Thanks,
Rob
www.quadrotech-it.com - All your EV Tools
PS I hope that the post proves helpful.
Is there anything else needed with this issue?
Many Thanks,
Rob
www.quadrotech-it.com - All your EV Tools
PS I hope that the post proves helpful.
Would you like to reply?
Login or Register to post your comment.