Forum Discussion
tharrison_91509
Jul 17, 2012Nimbostratus
PowerShell: Create Virtual Server
I have been tasked with writing a script using PowerShell to 'rename' several Virtual Servers in our BIG-IP. I have downloaded the iControl tool & the PowerShell cmdlets and they are connecting to ou...
Jul 17, 2012
Hi,
In looking at how you are calling the method, you are passing scalar values in while the parameters expect 1-d and 2-d arrays.
There's a whole bunch of PowerShell articles and examples I've written in the iControl wiki in the PowerShell topic:
https://devcentral.f5.com/wiki/iControl.PowerShell.ashx
I looked through there and there isn't an example that I've written on that page that says it creates a virtual server, but by going to the VirtualServer's create() wiki topic
https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__create.ashx
You can see at the bottom under the "Sample Code" section, there's one in there that uses that method.
https://devcentral.f5.com/wiki/iControl.PsProvisionVEForLocalDev.ashx
In that code, look in the "Create-Virtual" function and you'll see how I coded it.
Now, that method does create a http virtual, but you should be able to substitute the http profile for a tcp profile or something else that ties to your existing virtual server.
Hope this helps.
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects