The variable '$suites' cannot be retrieved

Jul 14, 2011 at 5:54 PM

Wondering if anyone else has experienced this sporadic error.  I have a script that utilizes the 'get-vmsummary' and 'start-vm' functions included with this pack.  Occasionally I will get the below error:

Receive-Job : The variable '$suites' cannot be retrieved because it has not been set.
At line:1 char:12
+ receive-job <<<<  hyperv
    + CategoryInfo          : InvalidOperation: (suites:Token) [ForEach-Object], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined,Microsoft.PowerShell.Commands.ForEachObjectCommand

As I said it's fairly sporadic, sometimes I can run the script 3-4 times without getting the error, other times it happens immediately.  The real pain is that once the error occurs I need to launch a new PS  and re-import the module to avoid getting the error again.