Thanks but sadly no - the code just sits at the >> prompt as if it was asking for more data to be entered.
On my personal ESXi 6.5 / PowerCli 6.5 system your code works fine - just not in my work ESXi 4.0U4 / PowerCli 5.1 Release 2 environment.
Chris