Is there a powershell way to achieve this? I have to do this for 40 servers.
Set the following permissions on all SharePoint servers in the farm (All must be done) – this is completed under Local Security Policy (gpedit.msc as administrator -> Windows Settings -> Security Settings -> Local Policies > User rights assignment) on each server
Grant Log on as a service
Impersonate a User
Act as part of the operating system