How to check and install multiple feature on multiple system

If we have multiple server and want to install multiple roles and features on each server.
First check , if installed, then display message , already installed
If not, then install the role/feature.

What would be the better way

Using FOrEACH or Taking Powershell session of every server and then do the thing.

If anybody have script, share please

I would probably write a script that did this just on the local server, and then use Invoke-Command to have each server run that script.