Forum Discussion
Kevin_Nelson
Jan 24, 2018Nimbostratus
Using James' information, this is a single-line (with a couple pre-configured conditions) that I used to verify the expected Server-side SSL profiles were assigned on a list of VIPs configured with a particular pool name pattern (where the pool names are POOL_200 or POOL_210):
Get-VirtualServer | ? Pool -match '.*/POOL_2[0,1]0' | Select Name,Pool,@{Name="ServerProfile"; Expression={ ( Invoke-RestMethod -Uri ( $_.profilesReference.link -replace "localhost", "" ) -Credential $cred ).items | ? context -eq serverside | Select -ExpandProperty Name } }
The pre-configured conditions were a stored credential (
$cred = Get-Credential
) adequate for authenticating with the LTM and the establishment of the F5 session using the stored credential (New-F5Session -LTMName -LTMCredentials $cred
). The stored credential is used again in the inline Invoke-RestMethod
in the command.
The result looked something like this:
name pool ServerProfile
---- ---- -------------
VIP_A /Common/POOL_200 serverssl-custom
VIP_B /Common/POOL_210 serverssl-custom
VIP_C /Common/POOL_210 serverssl-custom
VIP_D /Common/POOL_200 serverssl-custom
VIP_E /Common/POOL_210 serverssl-custom
You could change
context -eq serverside
to context -eq clientside
to see that profile or otherwise change the selection to suit.