f5devcentral / f5-icontrol-powershell-snapin

PowerShell Snapin for F5's iControl SOAP Library
MIT License
8 stars 7 forks source link

Cant install #4

Closed spuder closed 8 years ago

spuder commented 8 years ago

Whenever I run the setupSnapIn.ps1 script it fails to install

PS C:\Users\sowen\Documents\f5-icontrol-powershell-snapin> .\setupSnapIn.ps1
Registering iControlSnapin.dll on platform ''
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.8007
Copyright (c) Microsoft Corporation.  All rights reserved.

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\sowen\Documents\f5-icontrol-powershell-snapin\iControlSnapin.dll' or one of its dependencies. The system cannot find the file specified..
Registering iControlSnapin.dll on platform '64'
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.8007
Copyright (c) Microsoft Corporation.  All rights reserved.

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\sowen\Documents\f5-icontrol-powershell-snapin\iControlSnapin.dll' or one of its dependencies. The system cannot find the file specified..

It is complaining that iControlSnapin.dll is missing. Where do I get that dll?

spuder commented 8 years ago

I've followed the instructions here and unziped the file to c:\Program Files\F5 Networks\iControlSnapIn

The iControlSnapIn.dll is now present, however even after running ./setupSnapin.ps1, I still get this error:

PS C:\Program Files\F5 Networks\iControlSnapIn> Add-PSSnapin iControlSnapIn
Add-PSSnapin : Cannot load Windows PowerShell snap-in iControlSnapIn because of the following error: Could
not load file or assembly 'file:///C:\Program Files\F5 Networks\iControlSnapIn\iControlSnapIn.dll' or one of
its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Add-PSSnapin iControlSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (iControlSnapIn:String) [Add-PSSnapin], PSSnapInException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

Following these instructions does not work. Still can't get the snap in working

spuder commented 8 years ago

Looks like I had to unblock the zip file before extracting

screenshot 2016-08-22 16 38 00

ghost commented 4 years ago

If you have performed the instructions as suggested above

and if you still get the error.

The most likely cause would be the permission to the below registry path to your current account. You will need to provide full control to the registry HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellSnapIns .

Upon having full control, then re run the setupSnapIn.ps1 and you should be all set to proceed further.