With the new scripts the concept of limits was introduced to make sure that a script doesn't take up more resources than necessary. The default memory limit for new runtimes is 64MB, and in many cases this is good enough, but some PowerCLI cmdlets require more, so in these cases it is advices to increase it.
Please, increase the memory limit to something like 256MB (the right side of the action editor) and try again.