These are just basic powershell scripts. You can use your own logic to enhance this. cls #Connect to Vcenter Connect-VIServer -Server 172.28.xx.xx -user username -Password password #Take input from the user $pool = Read-Host "Input the Resource pool name" #Select the cluster from which the resource pool need to be selected. '*' represents all. Replace it with the resource pool name to be specific $rpools = Get-ResourcePool -Location * $vmpoff = $null $vmpon =$null #Select each resource pool from the cluster foreach($rpool in $rpools) { #Check if any resource pool name maches the user input if($rpool -match $pool) { $pool = $rpool.Name $vms = Get-VM -Location $rpool Foreach($vm in $vms) { $vmp =$vm.PowerState if($vmp -ne "PoweredOn") { [array]...