-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
All jobs always appear to have a 'HasMoredata' property of False. Even though receive data shows that each job does in fact have data.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Create any jobs with Start-RSJob that returns data, then use Get-RSJob and Receive-RSJob. The Get-RSJob will show that each job has a "HasMoreData" property of False. Receive-RSJob will show that each job actually does contain data.
What is the expected behavior?
HasMoreData should be True, when it has data. Ideally, when received, the data would be cleared from the job and the HasMoreData property would be set to False.
Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
Name Value
PSVersion 5.1.17134.765
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.765
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
ModuleType Version Name ExportedCommands
Script 1.7.4.4 PoshRSJob {Get-RSJob, Receive-RSJob, Remove-RSJob, Start-RSJob...}
Please provide a code example showing the issue, if applicable:
Example from https://learn-powershell.net/2015/03/31/introducing-poshrsjob-as-an-alternative-to-powershell-jobs/
$Test = 42
1..5|Start-RSJob -Name {"TEST_$($_)"} -ScriptBlock {
Param($Object)
$DebugPreference = 'Continue'
$PSBoundParameters.GetEnumerator() | ForEach {
Write-Debug $_
}
Write-Verbose "Creating object" -Verbose
New-Object PSObject -Property @{
Object=$Object
Test=$Using:Test
}
}```