I can upload a xlsx file with Write-RsRestCatalogItem but when I try it with a xlsm file I receive this error:

I can manually (in PBIRS) upload the xslm without any problems:

Is there a different function than Write-RsRestCatalogItem for xslm files? Or does the function needs an update to support xslm files?