Try replacing your line:
$tempcontentrules.blockedUrlCategories = $tempcontentrules.blockedUrlCategories | Select-Object -Property * -ExcludeProperty 'name'
with this:
$tempcontentrules.blockedUrlCategories = $($tempcontentrules.blockedUrlCategories | Select-Object -Property * -ExcludeProperty 'name').id
The first line stores the following in your $tempcontentrules.blockedUrlCategories variable:
"blockedUrlCategories": [
{
"id": "meraki:contentFiltering/category/11"
},
{
"id": "meraki:contentFiltering/category/46"
},
{
"id": "meraki:contentFiltering/category/49"
},
{
"id": "meraki:contentFiltering/category/52"
},
{
"id": "meraki:contentFiltering/category/56"
},
{
"id": "meraki:contentFiltering/category/57"
},
{
"id": "meraki:contentFiltering/category/59"
},
{
"id": "meraki:contentFiltering/category/70"
},
{
"id": "meraki:contentFiltering/category/71"
}
],
Meraki doesn't accept the "id": part of that json, so by using the second line you get this instead:
"blockedUrlCategories": [
"meraki:contentFiltering/category/11",
"meraki:contentFiltering/category/46",
"meraki:contentFiltering/category/49",
"meraki:contentFiltering/category/52",
"meraki:contentFiltering/category/56",
"meraki:contentFiltering/category/57",
"meraki:contentFiltering/category/59",
"meraki:contentFiltering/category/70",
"meraki:contentFiltering/category/71"
],
Literally just had to figure all this out with the help of this thread!