Take a look at http://www.virtu-al.net/2009/07/07/powercli-more-one-liner-power/ to see whether this fits your needs.
André
Discussion moved from VMware vCenter™ Server to VMware vSphere™ PowerCLI
Does this script change it for every VM in the environment? Does it matter if the unlimited box is already checked?
Get-VM | Get-VMResourceConfiguration | Where-Object {$_.MemLimitMB -ne '-1'} | Set-VMResourceConfiguration -MemLimitMB $null
Yes, the Get-VM will return all guests known under your current vSphere Server connection(s).
No, the Where-clause will only pass guests to the Set-VMResourceConfiguration cmdlet that do not have the unlimited box set.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Script worked to perfection... thanks to both you guys!