Forum Discussion
Setup iControlSnapin
I downloaded the powershell msi from this forumns download folder and follwed the steps on the tutorial to get it registered and I get the following error..
Assistance would be appreciated.
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> . .\setupSnapIn.ps1
Registering iControlSnapIn...
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.
The installation failed, and the rollback has been performed.
Remove-Item : Cannot find path 'C:\Program Files (x86)\F5 Networks\iControlSnapIn\iControlSnapIn.InstallLog' because it
does not exist.
At C:\Program Files (x86)\F5 Networks\iControlSnapIn\setupSnapIn.ps1:8 char:5
+ del <<<< iControlSnapIn.InstallLog
+ CategoryInfo : ObjectNotFound: (C:\Program File...apIn.InstallLog:String) [Remove-Item], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot find path 'C:\Program Files (x86)\F5 Networks\iControlSnapIn\iControlSnapIn.InstallState' because
it does not exist.
At C:\Program Files (x86)\F5 Networks\iControlSnapIn\setupSnapIn.ps1:9 char:5
+ del <<<< iControlSnapIn.InstallState
+ CategoryInfo : ObjectNotFound: (C:\Program File...In.InstallState:String) [Remove-Item], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
9 Replies
- adrianallan_181
Nimbostratus
Ok got this far but still having issues:
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> .\setupSnapIn.ps1
Registering iControlSnapIn...
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> powershell -psconsolefile .\iControlSnapIn.psc1
WARNING: The following errors occurred when loading console C:\Program Files (x86)\F5
Networks\iControlSnapIn\iControlSnapIn.psc1:
Cannot load Windows PowerShell snap-in iControlSnapIn because of the following error: The Windows PowerShell snap-in
'iControlSnapIn' is not installed on this machine.
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved. - Are you by chance running on a 64-bit platform. Give this updated script a shot. I'm still getting feedback on it before I roll it into the primary distribution so let me know if it works for you.
http://devcentral.f5.com/wiki/default.aspx/iControl/PowerShellSetupSnapin.html
-Joe - rmainar_77944
Nimbostratus
I'm running 64-bit Win7 and here are the errors I'm getting after running the updated script you provided -
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> .\setup.ps1
Registering iControlSnapin.dll on platform ''
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.Registering iControlSnapin.dll on platform '64'
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> get-pssnapin -registered
Name : iControlSnapIn PSVersion : 2.0 Description : iControl Snap-in for F5 Device Management
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> add-pssnapin -icontrolsnapin
Add-PSSnapin : A parameter cannot be found that matches parameter name 'icontrolsnapin'. At line:1 char:29 + add-pssnapin -icontrolsnapin <<<< + CategoryInfo : InvalidArgument: ([Add-PSSnapin], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.AddPSSnapinCommand
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> get-icontrolcommands
The term 'get-icontrolcommands' 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:21 + get-icontrolcommands <<<< + CategoryInfo : ObjectNotFound: (get-icontrolcommands:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException - A couple of things. Looks like you got the install to complete. The problem is your add-pssnapin call. You are using the name of the snapin as the parameter name, not the parameter value. That's indicated by the "parameter cannot be found" error. The correct syntax is
PS> Add-PSSnapin -Name iControlSnapin
And the second issue is the get cmdlet is missing the "F5." namespace in it. I think there's some documentation I need to update but in the mean time, you can get the associated iControl cmdlets with the "Get-F5.iControlCommands" cmdlet. You can also use "Get-Command *F5*".
Take a look at the numerous tech tips and codeshare entries I've written around PowerShell to get you started.
http://devcentral.f5.com/wiki/default.aspx/iControl/PowerShell.html
Hope this helps!
-Joe - rmainar_77944
Nimbostratus
Yup that helped immensely. I'm new to PS so I was just following the syntax on the Readme.txt file that came with the icontrol download. The instructions on them are not correct.
Thank you.
Rob - rezilient_76720
Nimbostratus
I second that, the instructions in the readme.txt say:
Add-PSSnapIn -iControlSnapIn
Should be:
Add-PSSnapIn -Name iControlSnapIn
Also in the readme this: Get-iControlCommands
Should be:
Get-F5.iControlCommands
Thanks!
-Rezilient - Radim_Bosticka_
Nimbostratus
Does anybody have experience with Powershell 2?
I am getting this error:
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> .\setupSnapIn.ps1
Registering iControlSnapIn...
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> Add-PSSnapin -Name iControlSnapin
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
At line:1 char:13
+ Add-PSSnapin <<<< -Name iControlSnapin
+ CategoryInfo : InvalidArgument: (iControlSnapin:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> Get-ItemProperty
PS C:\Program Files (x86)\F5 Networks\iControlSnapIn> powershell -psconsolefile .\iControlSnapIn.psc1
WARNING: The following errors occurred when loading console C:\Program Files (x86)\F5
Networks\iControlSnapIn\iControlSnapIn.psc1:
Cannot load Windows PowerShell snap-in iControlSnapIn because of the following error: No snap-ins have been registered
for Windows PowerShell version 2.
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved. - Radim_Bosticka_
Nimbostratus
OK. Answer is here http://devcentral.f5.com/wiki/default.aspx/iControl/PowerShellSetupSnapin.html - venki
Nimbostratus
If you have performed the instructions as suggested in the here: https://guptaashish.com/tag/powershell/
and if you still find the above 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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com