Forum Discussion

paul_dawson_258's avatar
paul_dawson_258
Icon for Nimbostratus rankNimbostratus
Oct 31, 2016

Help with ASM Query

Hi, I am new to powershell and I an trying to create a simple query that will list the Virtual Server and the ASM policy name associated with the server. The following query returns all ASM Policies for all Virtual Servers. Please can you help where I am going wrong.

$vips = (Get-F5.iControl).LocalLBVirtualServer.get_list()
ForEach ($vip in $vips){
$asmPol = (Get-F5.iControl).ASMWebApplication.get_list($vip)
if ($asmPol){

Write-Output $asmPol

}
}