Repro
- Open ISE
- Invoke
ConfigInstructions Name {} in the REPL
- Open a second REPL tab in ISE.
- Invoke
ConfigInstructions Name {} in the second REPL tab
- The following error is output:
format-default : The following exception occurred while trying to enumerate the collection: "The term 'New-ProgressNodes' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.".
+ CategoryInfo : NotSpecified: (:) [format-default], ExtendedTypeSystemException
+ FullyQualifiedErrorId : ExceptionInGetEnumerator,Microsoft.PowerShell.Commands.FormatDefaultCommand
Cause
The cause of this error seems to be PowerShell itself. When a module that implements an object that implements IEnumerator is loaded into two runspaces in the same process, then, in the second runspace no functions from the module are available from within .GetEnumerator().
There is a repro of this bug that is independent of ZeroDSC in the ToolFoundations repo.
Affected PowerShell Versions
Versions known to exhibit problem:
- 5.0.10586.51
- 5.0.10586.117
Versions known not to exhibit problem:
Expected Resolution
It looks like PowerShell 5.0 has this problem but 5.1 does not. This issue should remain open until it has been confirmed that the GA version of PowerShell 5.1 indeed ships with this issue resolved.
Repro
ConfigInstructions Name {}in the REPLConfigInstructions Name {}in the second REPL tabCause
The cause of this error seems to be PowerShell itself. When a module that implements an object that implements
IEnumeratoris loaded into two runspaces in the same process, then, in the second runspace no functions from the module are available from within.GetEnumerator().There is a repro of this bug that is independent of ZeroDSC in the ToolFoundations repo.
Affected PowerShell Versions
Versions known to exhibit problem:
Versions known not to exhibit problem:
Expected Resolution
It looks like PowerShell 5.0 has this problem but 5.1 does not. This issue should remain open until it has been confirmed that the GA version of PowerShell 5.1 indeed ships with this issue resolved.