I am using below PowerShell code in azure functions to retrieve rows of users in azure table who belongs to a particular location.
$Rows = Get-AzTableRow -table $cloudTable -customFilter "((Location eq '$loc') and (PartitionKey eq 'User'))"
Next, I need to pass the result ($Rows
) of the above query to a function as parameter. Tried to define the function as
function display_rows($param){
$tempcount = $param.Count
for($i=0; $i -lt $tempcount; $i++){
...code body...
}
}
and invoke the function as display_rows "$Rows"
. But it seems it's not working as intended. Is this the proper way to pass the result of Get-AzTableRow
to a function? please help me with this.