I get all my sites via:
$pages = Get-PnPListItem -List Sites
I use the variable and get to every site in a foreach-loop:
foreach($page in $pages)
{
Write-Host "Page" $page.FieldValues["FileLeafRef"] "..."
}
Above will print out the name for every page. Let say that the page come from a library/list that have the column "category". How can I access the value from that column in the foreach-loop?