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
}
}