Sure so we use a wrapper called psappdeploy which for intune is invaluable (intune logs are really painful to go through) PSAppDeployToolkit. It has some additional functions so all we have for installing office is below lines:
# Try to remove any existing office install
write-log "Trying to remove old versions of Office staged on build"
Execute-Process -Path "$dirFiles\setup.exe" -Parameters "/CONFIGURE remove.xml" -ContinueOnError $true -IgnoreExitCodes '*'
# Install fresh office
write-log "Installing Office"
Execute-Process -Path "$dirFiles\setup.exe" -Parameters "/CONFIGURE Office64.xml
Have to make sure you ignoreexitcodes for removal as for example base windows ISO from Microsoft wouldnt have it in place - and without ignoring error codes it would just fail before trying to install office.