Forum Discussion
Powershell query for SSL Client profile
Hi,
I would like to use powershell iControl snapin to query all Virtual Servers and list the ones that have an SSL client profile.
I have tried:
$ProfileSSL = (Get-F5.iControl).LocalLBVirtualServer.ProfileClientSSL
and
$ProfileSSL = (Get-F5.iControl).ProfileClientSSL
What am I missing?
Thanks,
Paul
3 Replies
- Joel_Newton
Cirrus
I believe you'll need to pass the virtual server name to the get_profile() method. Something like this:
$vips = (Get-F5.iControl).LocalLBVirtualServer.get_list() ForEach ($vip in $vips){ $profiles = (Get-F5.iControl).LocalLBVirtualServer.get_profile($vip) If ($profiles){ write-output "Virtual Server: $Vip" Write-Output "Profiles: `r`n " + $profiles } Write-Output "-----" } - Jalees_Ahmed_19
Nimbostratus
Hi Joel,
I tried to set the context to Client SSL profile. But, it doesn't seem to work. Could you please take a look at the below code once?:
If ($profiles){$profile1 = New-Object -TypeName iControl.LocalLBVirtualServerVirtualServerProfile $profile1.profile_context = "PROFILE_CONTEXT_TYPE_CLIENT" $profile1.profile_name = $vip (Get-F5.iControl).LocalLBVirtualServer.get_profile($profile1.profile_name) write-output "Virtual Server: $Vip" Write-Output "Profiles: `r`n " + $profiles }Hi, Jalees, I actually haven't used the iControl COM object in years. Are you getting a specific error with your attempts, or does it just fail silently?
I exclusively use iControlREST to automate anything related to the F5. I've created a PowerShell module to do this: https://github.com/joel74/POSH-LTM-Rest
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
