You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The creation of an instance of the Powershell class by specifying an InitialSessionState, do not update the 'IsRunspaceOwner' property. #6422
WARNING: Automatic release : False
WARNING: Automatic release : True
Id Name ComputerName Type State Availability
-- ---- ------------ ---- ----- ------------
2 Runspace2 localhost Local Closed None
Actual behavior
#WARNING: Automatic release : False
#WARNING: Automatic release : False
$PS.Runspace
# Id Name ComputerName Type State Availability
# -- ---- ------------ ---- ----- ------------
# 2 Runspace2 localhost Local Opened Available
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.0.2
PSEdition Core
GitCommitId v6.0.2
OS Microsoft Windows 6.1.7601 S
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0,5.0,5.1.10032.0,6.0.2}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
IsRunspaceOwner = true means that a runspace is created by the PowerShell object. IsRunspaceOwner = false means that a runspace is created out of the PowerShell object and assigned to the PowerShell object.
Activity
iSazonov commentedon Mar 19, 2018
IsRunspaceOwner = truemeans that a runspace is created by the PowerShell object.IsRunspaceOwner = falsemeans that a runspace is created out of the PowerShell object and assigned to the PowerShell object.PowerShell/src/System.Management.Automation/engine/hostifaces/PowerShell.cs
Line 1808 in c1c5344
PowerShell/src/System.Management.Automation/engine/hostifaces/PowerShell.cs
Line 1757 in c1c5344
SteveL-MSFT commentedon Mar 19, 2018
cc Bruce Payette (@BrucePay)
iSazonov commentedon Mar 20, 2018
I updated my comment with code references.
LaurentDardenne commentedon Apr 10, 2018
Ilya (@iSazonov) Is your comment correct ?
Is not it ?
In my example who should release the created runspace?
iSazonov commentedon Apr 10, 2018
My comment fixed.
iSazonov commentedon Apr 10, 2018
If you created you should release.