Can you check what EntityType values are present in the XML file with the following snippet?
$vInventory = [xml]"<dummy/>"
$vInventory.Load($XMLfile)
$vInventory.SelectNodes("Inventory/Permissions/Permission") |
Select -ExpandProperty EntityType |
Group-Object
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference