How to add 2 different conditions in powershell

Hi Guys,

I'm applying a script to an AMP (Automated Monitoring Policy) on SolarWinds

If i execute the script as it is, I am getting a result but when I add them up inside the AMP, I am not getting a result

this is my condition script

$Exclusion = {($_.PSParentPath -notlike "*Remote Desktop") -and ($_.PSParentPath -notlike "*Runtime_Transport_Store*") -and ($_.Issuer -notlike "*MS-Organization-P2P-Access*") -and ($_.Issuer -notlike '*Windows Azure CRP Certificate Generator')}

$ExpiryDetails = Get-ChildItem -path cert:\ -Recurse | Where-Object {$_.notafter -ge (get-date)} | Where-Object $Exclusion | Select-Object PSParentPath, Issuer, Notafter | Format-List

What am I doing wrong?

Please help

Thanks

Newbie