Forum Discussion
Mike_Schnorr_64
Nimbostratus
Oct 17, 2007Powershell Twoi-Dimensional Array
I have been using the iControl assembly from PowerShell. Nice work Joe, I look forward to seeing what you come up with for CMDLets.
I am running into a problem with creating multi-dimensional arr...
Mike_Schnorr_64
Nimbostratus
Oct 17, 2007No luck. Here is the whole chunk of code I am using as well as the error message in case it helps anyone.
$Definition
$Definition = New-Object -TypeName icontrol.CommonVirtualServerDefinition
$Definition.address = "192.168.1.1"
$Definition.name = "IControlTest"
$Definition.port = 80
$Definition.protocol = "PROTOCOL_TCP"
$WildMask = "255.255.255.255"
$Resources = New-Object -typeName iControl.LocalLBVirtualServerVirtualServerResource
$Resources.default_pool_name = "TestPool"
$Resources.type = "RESOURCE_TYPE_POOL"
$Profile = New-Object -typename iControl.LocalLBVirtualServerVirtualServerProfile
$Profile.profile_name = "http"
$Profile.profile_context = "PROFILE_CONTEXT_TYPE_ALL"
$testActiveF5.LocalLBVirtualServer.create(@($Definition), @($WildMask), @($Resources), (,$Profile))
> $testActiveF5.LocalLBVirtualServer.create(@($Definition), @($WildMask), @($Resources), (,$Profile))
Cannot convert argument "3", with value: "System.Object[]", for "create" to type "iControl.LocalLBVirtualServerVirtualS
erverProfile[][]": "Cannot convert "iControl.LocalLBVirtualServerVirtualServerProfile" to "iControl.LocalLBVirtualServe
rVirtualServerProfile[]"."
At line:1 char:42
+ $testActiveF5.LocalLBVirtualServer.create( <<<< @($Definition), @($WildMask), @($Resources), (,$Profile))
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