How to pass item in array item to powershell command that uses a filter

Viewed 40
accounts=$(az ad sp list --show-mine --query [].appDisplayName -otsv)

This will give me an array

I want to pass each item to an array in this command

foreach ($myApp in $accounts){
Get-AzureADApplication -Filter "DisplayName eq $myApp"
}

When I try this I get syntax error at position is this even possible

I'm a noob to powershell

1 Answers
Related