Forum Discussion
How to get specific SSL Profile corrponding with Virtual through Powershelll Icontrol
Hi
When I ran below command, I am getting full output of profiles associated with Virtual. But I can't able to parse the Client SSL from output and getting "iControl.LocalLBVirtualServerVirtualServerProfileAttribute" print.
Do we have any other way? I can get SSL profile name and parse it.
((Get-f5.iControl).LocalLBVirtualServer).get_profile("$virtual")
profile_type profile_context profile_name
------------ --------------- ------------
PROFILE_TYPE_CLIENT_SSL PROFILE_CONTEXT_TYPE_CLIENT clientssl_wildcard.xyz.com_bs... PROFILE_TYPE_HTTP PROFILE_CONTEXT_TYPE_ALL http_xforward_gs_pr PROFILE_TYPE_TCP PROFILE_CONTEXT_TYPE_ALL tcp_exception_bpos_gs_pr
2 Replies
Hi!
If all you want is the Client SSL profile this should work:
Add-PSSnapIn iControlSnapIn $Success = Initialize-F5.iControl -Hostname 192.168.161.10 -Credentials (Get-Credential) Foreach($VSProfiles in ((Get-f5.iControl).LocalLBVirtualServer).get_profile("PajoIIS-443")){ $ClientSSLProfile = $vsprofiles | where { $_.profile_type -eq "PROFILE_TYPE_CLIENT_SSL" } If($ClientSSLProfile){ $ClientSSLProfile } else { "No client SSL profile was found" } }/Patrik
- Desai_124243
Nimbostratus
Awesome. Patrick. This Works for me
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
