F5 BIG-IP PowerShell Project – 2. Installation
Sorry for the long hiatus! I’m back, and because of the number of requests am continuing the posts on the BIG-IP PowerShell Project.
In this post, I am going to be installing the commandlets on my Windows 7 machine. The installation is pretty simple, and I’ve broken it down into 5 steps.
- Download and Run the Installer
- Start and Configure the PowerShell Environment
- Register the Snap-in
- Load the Snap-in into the PowerShell Runtime
- Verify the Installation
I am assuming that you have PowerShell v2 already installed on your system. These instructions will cover Windows 7 and Windows 2008, 32 and 64 bit versions.
The following instructions will guide you through installing the commandlets onto a Windows machine. You will then be able to run the commandlets on the Windows machine to configure and monitor your BIG-IP LTM.
1. Download and Run the Installer
The BIG-IP commandlets are packaged together with an .msi installer. You can download the package (iControlSnapInSetup.msi) here. Download this file to your desktop or wherever you can easily find it. Once this file is downloaded to the Windows machine that you want to install the commandlets onto, double click the file to start the installation process.
You can actually accept all of the defaults of this installer. I pasted the screens below so you can see the process.
In the screen above, click ‘Next’
In the screen above, click ‘Next’
In the screen above, click ‘Next’
You may get the ‘User Access Control’ popup here. Go ahead and accept, and the installer will start installing. If all goes well, you should see the following.
Click on ‘Close’.
2. Start and Configure the PowerShell Environment
It’s time to register the iControl Snap-in into PowerShell, and that typically means that you’re going to have to change your PowerShell execution policy to “Remote Signed” (or “Unrestricted”, but that is less secure).
To set the policy, you will need to start PowerShell with administrative privileges.
Navigate to the Windows PowerShell icon in your start menu (Start –> All Programs –> Accessories –> Windows PowerShell –> Windows PowerShell), right click, and select ‘Run as administrator’.
Once the PowerShell windows appears, run the command below to set the execution policy to RemoteSigned
PS C:Windowssystem32> Set-ExecutionPolicy RemoteSigned
You will now get a prompt to verify that you want to change the policy. Select ‘Y’ for yes.
You can check what the current policy is at any time by issuing the following command
PS C:Windowssystem32> Get-ExecutionPolicy
The screenshot below shows the PowerShell interface when running the Set-ExecutionPolicy command
3. Register the Snap-in
Now you’ll need to run the setup script to register the Snap-in. You’ll need to cd into the directory that the files were installed into. Assuming you installed them into the default directory, here are the following steps you need to take.
I’ve split the following instructions up below for those on 32 bit and 64 bit Windows systems.
| 32 bit Windows
PS C:Windowssystem32> cd ‘C:Program FilesF5 NetworksiControlSnapIn’ Then run the setup script PS C:Program FilesF5 NetworksiControlSnapIn> .setupSnapIn.ps1 |
| 64 bit Windows PS C:Windowssystem32> cd ‘C:Program Files (x86)F5 NetworksiControlSnapIn’
Then run the setup script PS C:Program Files (x86)F5 NetworksiControlSnapIn> .setupSnapIn.ps1 |
4. Load the Snap-in into the PowerShell runtime
So now you need to load the Snap-in into the PowerShell runtime so we can make use of the calls. Because the assembly was originally written for a 32 bit system, trying to add the Snap-in will fail on a 64 bit system. On a 64bit system, you need to run a small script (linked to below in the 64 bit section) to set the directories correctly.
| 32 bit Windows PS C:Program FilesF5 NetworksiControlSnapIn> Add-PSSnapin iControlSnapIn |
| 64 bit Windows As I mentioned above, the current installer is a little whacked, so you have to run a script or the Snap-in wont load properly. These commands will open notepad so you can paste the script in, and then save&close it so you can run it. PS C:Program Files (x86)F5 NetworksiControlSnapIn> notepad psinstall.ps1 The script you need is located here -> Copy and paste it into the notepad session you just opened. Save and Exit notepad. Now run the script you just created by issuing the command below PS C:Program Files (x86)F5 NetworksiControlSnapIn> .psinstall.ps1 Now you can run the normal addsnapin command PS C:Program Files (x86)F5 NetworksiControlSnapIn> Add-PSSnapin iControlSnapIn |
5. Verify the Installation
Now if the Snap-in registered correctly, you should be able to tell by issuing a Get-PSSnapin
PS C:Program Files (x86)F5 NetworksiControlSnapIn> Get-PSSnapin
As in the screen above, look for the following
Name : iControlSnapIn
PSVersion : 2.0
Description : iControl Snap-in for F5 Device Management
If you found that, you’re good to go!!





![IMG_0208[1]](http://farm8.staticflickr.com/7434/8729260249_87c99e2ab3_m.jpg)
![IMG_0205[1]](http://farm8.staticflickr.com/7297/8730379300_d1289ca3a8_m.jpg)
![IMG_0209[1]](http://farm8.staticflickr.com/7450/8730378872_cae6a603f2_m.jpg)
![IMG_0204[1]](http://farm8.staticflickr.com/7435/8729258735_8d55a07ec5_m.jpg)