Powershell script to renew certificate on remote exchange servers

I was actually able to get it to work by changing:
-FileData ([Byte[]]$(Get-Content -Path \domain.com\share\exchange-cert.pfx -Encoding byte -ReadCount 0))
to use certificate hash.

My main problem is, IIS certificate doesnt update for exchange backend on every server. Is there a way to automate this process?