iControlSnapIn Problems
I'm at the end of my wits here, I've read through all the guides, followed each of them to a word, I've been through several uninstalls and restarts and I'm still nowhere near getting this snapin to work...
Without further adieu, here's the complete list of errors I've been getting for the last several hours:
Post install:
Get-F5.LTMPool : The term 'Get-F5.LTMPool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-F5.LTMPool
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-F5.LTMPool:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I guess I'd better try to add the snap-in again:
Add-PSSnapIn : Cannot load Windows PowerShell snap-in iControlSnapIn because of the following error: The Windows PowerShell snap-in module C:\Program Files (x86)\F5
Networks\iControlSnapIn\iControlSnapin.dll does not have the required Windows PowerShell snap-in strong name iControlSnapIn, Version=11.2.0.0, Culture=neutral,
PublicKeyToken=null.
At C:\dev\ARM-Tools\Code Snippets\Shane\F5Helper.psm1:9 char:5
+ Add-PSSnapIn iControlSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (iControlSnapIn:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
I resolved that by forcing a remove and then an add of the snap-in:
Unregistering iControlSnapin.dll on platform ''
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.7905
Copyright (c) Microsoft Corporation. All rights reserved.
Unregistering iControlSnapin.dll on platform '64'
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.7905
Copyright (c) Microsoft Corporation. All rights reserved.
Registering iControlSnapin.dll on platform ''
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.7905
Copyright (c) Microsoft Corporation. All rights reserved.
Registering iControlSnapin.dll on platform '64'
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.7905
Copyright (c) Microsoft Corporation. All rights reserved.
Another attempt at using one of the cmdlets available through the snap-in:
Initialize-F5.iControl : The term 'Initialize-F5.iControl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Initialize-F5.iControl
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Initialize-F5.iControl:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Maybe it didn't add the first 2 times, I should try it again:
PS C:\program files (x86)\F5 Networks\iControlSnapin> Add-PSSnapIn iControlSnapIn
Add-PSSnapIn : An item with the same key has already been added.
At line:1 char:1
+ Add-PSSnapIn iControlSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-PSSnapin], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.AddPSSnapinCommand
Looks like it's already there, I'd better remove it because it's not working:
PS C:\program files (x86)\F5 Networks\iControlSnapin> Remove-PSSnapIn iControlSnapIn
Remove-PSSnapIn : No Windows PowerShell snap-ins matching the pattern 'iControlSnapIn' were found. Check the pattern and then try the command again.
At line:1 char:1
+ Remove-PSSnapIn iControlSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (iControlSnapIn:String) [Remove-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : NoPSSnapInsFound,Microsoft.PowerShell.Commands.RemovePSSnapinCommand
So I uninstall and reinstall and follow the guides again, just to get another failure message:
Get-F5.LTMPool : The term 'Get-F5.LTMPool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-F5.LTMPool
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-F5.LTMPool:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I'm running Windows 8.1, 64-bit, PS v.4. Can anyone help me get this going?
Thanks to DeniceJ for necromancing this thread, I would have forgotten about it if I didn't get the alert
Here's the code I've been using for the last few years to register the iControlSnapIn.dll and add the snap-in to the current session
$PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition $snapinPath = "$PSScriptRoot\f5-icontrol-powershell-snapin-12_1_0\iControlSnapIn.dll" $snapinName = "iControlSnapIn" if (Get-PSSnapIn -name $snapinName -ErrorAction Ignore) { Write-Output "Verified that '$snapinName' snap-in is currently registered to this session" } else { Write-Output "The '$snapinName' snap-in is not currently registered to this session, installing assembly for this snap-in from the following path now:`n$snapinPath" $installUtil = "$env:windir\Microsoft.Net\Framework${platform}\v2.0.50727\installUtil.exe"; if ( [System.IO.File]::Exists($installUtil) ) { Set-Alias installUtil $installUtil; installUtil $snapinPath /LogToConsole=false /LogFile=; } Write-Output "The '$snapinName' snap-in assembly has been registered, adding snap-in to this session now..." Add-PSSnapIn $snapinName Add F5 iControl Library Write-Output "The '$snapinName' snap-in has been added to this session, continuing...`n" }
Note that I store the f5-icontrol-powershell-snapin-12_1_0 folder which contains the iControlSnapIn.dll in my script directory, as the script needs to run from different machines that may not have any F5 software installed.