You need to add extra metadata as its a shared script and also you didnt use the variable in your script which specified the cluster, dont forget to restart the PowerActions service and restart your browser as well!
Your script would be something like this:
param
(
[Parameter(Mandatory=$true)]
[VMware.VimAutomation.ViCore.Types.V1.Inventory.Cluster]
$vParam
);
Get-VM -Location $vParam | Get-VMResourceConfiguration | where {$_.CPUReservationMhz -ne ‘0’}