Forum Discussion
Few cmdlets are working with iControl
Hello, Im new to this. This is what ive done. 1) Installed .msi file 2) Executed setupSnapIn.ps1 3) Added pssnapin 4) Initialize-F5.iControl -HostName name -Username username -Password password
Get-F5.iControl works. Get-Command -Module iControlSnapIn works.
But i can't Get-F5.LTMPool -Pool pool name or Get-F5.LTMVirtualServer -VirtualServer xxx.xx.xx
Why? What am i doing wrong?
thanks!
What exactly is the error? Are the cmdlets not found or just not returning any information?
What is returned when you type in this:
PS> Get-F5.iControlCommands
It should return a list of a couple dozen cmdlets. Also, what happens when you type this
PS> (Get-F5.iControl).SystemSystemInformation.get_system_information()
That should print out product specific information.
More details on the error will help diagnose things on our side.
- Martin_B__246_rNimbostratus
Hi, sorry for the lack of information. Get-F5.iControlCommands returns as you said some cmdlets. Add-F5.LTMPoolMember Add-F5.LTMVirtualServerRule Disable-F5.LTMNodeAddress and so on...
(Get-F5.iControl).SystemSystemInformation.get_system_information() returns this:
You cannot call a method on a null-valued expression. At line:1 char:1 + (Get-F5.iControl).SystemSystemInformation.get_system_information() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull
But if i run Get-F5.iControl this is returned: ASMLoggingProfile : iControl.ASMLoggingProfile ASMObjectParams : iControl.ASMObjectParams ASMPolicy : iControl.ASMPolicy ASMSystemConfiguration : iControl.ASMSystemConfiguration
and so on...
I can see verion. version : 11.2.0
- Martin_B__246_rNimbostratusForgot to answer your question, cmdlets are not returning any information when i run them. I haven't tried them all of course.
Hmm, I'm wondering what is null in that line. how about this
$ic = Get-F5.iControl; if ( $null -eq $ic ) { Write-Host "interfaces is null; } $sysInfo = $ic.SystemSystemInformation; if ( $null -eq $SysInfo ) { Write-Host "SystemInfo interface is null; } $systemInformation = $sysInfo.get_system_information(); if ( $null -eq $systemInformation ) { Write-Host "system information is null;" }
-Joe
- Martin_B__246_rNimbostratus
Hi, thanks for helping out. I got this from running above code:
You cannot call a method on a null-valued expression. At line:5 char:1 + $systemInformation = $sysInfo.get_system_information(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull system information is null;
- Martin_B__246_rNimbostratus
It seems like i don't have same properties and methods as "everyone" else. This works:
$ic.ManagementPartition.get_partition_list()
But not this:
$ic.ManagementPartition.get_list()
Maybe i need to re-download and install the .msi file again.
- ShaneCal_162988AltocumulusI'm the same, the get_list() method is throwing: Method invocation failed because [iControl.ManagementPartition] does not contain a method named 'get_list' However, this is working just fine: $ic.ManagementPartition.get_partition_list()
- Martin_B__246_rNimbostratus
Method invocation failed because [iControl.ManagementPartition] does not contain a method named 'get_list'. At line:1 char:1 + $ic.ManagementPartition.get_list() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound
- Martin_B__246_rNimbostratus
Anyone? My goal is to create a webpage to display servers that are enabled/disabled. But i cant do that since this snapin wont work.
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