jeudi 11 juillet 2019

looping if-statement with using Foreach in powershell

I want to loop my if-statement with using Foreach in powershell

if($weekly -eq $g.custom_fields.Mediensatz.value)

{

if($CurrentDate -ge $i)
{
Write-Host -ForegroundColor Green "correct" 
}

else
{
Write-Host -ForegroundColor yellow "false"
}

}

else { Write-Host -ForegroundColor Red "false" }

return }

my if-statement works good but I can't loop it

Aucun commentaire:

Enregistrer un commentaire