I assume you have the VM name in variable $vmName, then you could do
$vm = Get-VM -Name $vmName
New-VIPermission -Entity $vm -Principal ("SVR_" + $vmName) -Role $role
You can place those lines in a loop.
That could for example be a loop controlled by the content from a CSV file.
Something like this
Import-Csv C:\vmnames.csv | %{
$vm = Get-VM -Name $_.vmName
New-VIPermission -Entity $vm -Principal ("SVR_" + $_.vmName) -Role $_.role
}
This assumes the CSV file would look something like this
"vmName";"role"
"vm1","administrator"
"vm2","read-only"