-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
The output and PSDataStreams are available individually from a PowerShell instance. These individual streams, however, do not seem to contain enough information to determine order of an item in one stream compared with an item in another stream.
Steps to reproduce
$ErrorActionPreference = 'Continue'
$powershell = [powershell]::Create().AddScript({
$VerbosePreference = 'Continue'
'output1'
Write-Verbose 'verbose1'
Write-Error 'error1'
Write-Error 'error2'
Write-Verbose 'verbose2'
'output2'
})
$powershell.Invoke()
$powershell.Streams.Verbose
$powershell.Streams.ErrorBehavior I'm looking for
output1
verbose1
$VerbosePreference = 'Continue'
'output1'
Write-Verbose 'verbose1'
Write-Error 'error1'
Write-Error 'error2'
Write-Verbose 'verbose2'
'output2'
: error1
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
$VerbosePreference = 'Continue'
'output1'
Write-Verbose 'verbose1'
Write-Error 'error1'
Write-Error 'error2'
Write-Verbose 'verbose2'
'output2'
: error2
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
verbose2
output2
Actual behavior
output1
output2
verbose1
verbose2
$VerbosePreference = 'Continue'
'output1'
Write-Verbose 'verbose1'
Write-Error 'error1'
Write-Error 'error2'
Write-Verbose 'verbose2'
'output2'
: error1
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
$VerbosePreference = 'Continue'
'output1'
Write-Verbose 'verbose1'
Write-Error 'error1'
Write-Error 'error2'
Write-Verbose 'verbose2'
'output2'
: error2
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.4
PSEdition Core
GitCommitId 6.1.0-preview.4
OS Microsoft Windows 6.3.9600
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime