DexterPOSH / PSRemotely

Remote operations validation framework, exposes a DSL to wrap existing Pester/PoshSpec based validation tests.
http://psremotely.readthedocs.io/en/latest/
MIT License
46 stars 7 forks source link

Fix Start-RemotelyJobProcessing function logic. #55

Closed DexterPOSH closed 7 years ago

DexterPOSH commented 7 years ago

In the v1.0.3 release, found out that the Start-RemotelyJobProcessing function started throwing below error. This indicates the flaw in logic where the Remotely job is being processed more than once.

PS C:\Users\Administrator\Desktop> $Error[3]
Add-Member : Cannot add a member with the name "__Streams" because a member with that name 
already exists. To overwrite the member anyway, add the Force parameter to your command.
At C:\Program Files\WindowsPowerShell\Modules\PSRemotely\1.0.3\Private\Helper.ps1:35 char:20
+ ... putStream = Add-Member -InputObject $outputStream -PassThru -MemberTy ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (@{TagFilter=Sys...et=S2D-Node-01}:PSObject) [ 
   Add-Member], InvalidOperationException
    + FullyQualifiedErrorId : MemberAlreadyExists,Microsoft.PowerShell.Commands.AddMemberComma 
   nd