Step 1: Parameterize your powershell script so that it can accept arguments. Multiple examples of how to do that are explained here: https://stackoverflow.com/questions/5592531/how-to-pass-an-argument-to-a-powershell-script
Step 2: Run a local command in BatchPatch to execute the script.
‘Actions > Execute local process/command > Create/modify’ :
powershell.exe c:scriptspowershellscript.ps1 vCenterName, ResourcePoolName
or if you want to pass the host name from the BatchPatch ‘Host’ column you can use $computer :
powershell.exe c:scriptspowershellscript.ps1 $computer, vCenterName, ResourcePoolName