Max Kozlov
Max Kozlov
may be `[hashtable]::Synchronized` can be used in this case ? something like that: ``` $syncHash = [hashtable]::Synchronized(@{}) $scriptblock = { try { #some code } finally { ($Using:syncHash)['vars'] = (Get-Variable)...
OK, already found that my example not usable as it was :). Edited to correct form. great addition! but I suggest do not use `$_` in `finally`.... things happen ;-)
something strange happen with this example: ``` $syncHash = [hashtable]::Synchronized(@{}) $scriptblock = { try { #some code $Test = $_ $Test } finally { #Lock the object to prevent issues...
here is nasty workaround. this way we get all variables values but it is really nasty :-\ `($Using:syncHash)[$Test] = (Get-Variable | Foreach-Object { [PSCustomObject]@{Name=$_.Name; Value = (Invoke-Expression ('$'+$_.Name))} })`
Do you try to use latest build?
I'm ready to make PR which should fix it. Please test my fork before...
Should say, this is feature :) The way it works not clearly documented: If you want to read large text, you can try :) https://github.com/MVKozlov/PoshRSJob/wiki/NewParam-branch-changes short version: `If scriptblock.param.count -ne...
Are you sure your problem isn't with the Exchange cmdlets? Are they thread safe? Can you demonstrate the same problem with simple commands? If not, I'm pretty sure it's not...
19 successful jobs ... It could also mean that race conditions inside cmdlets just haven't been encountered 19 times :) The `-Force` switch actually does the same thing as the`...
`-PerJobTimeout` is the my fork feature. The original doesn't have it If you get this error the wrong module version loaded is `Get-Module PoshRSJob` return Version 1.7.5.2 ? btw, latest...