Title: The creation of an instance of the Powershell class by specifying an InitialSessionState, do not update the 'IsRunspaceOwner' property. · Issue #6422 · PowerShell/PowerShell · GitHub
Open Graph Title: The creation of an instance of the Powershell class by specifying an InitialSessionState, do not update the 'IsRunspaceOwner' property. · Issue #6422 · PowerShell/PowerShell
X Title: The creation of an instance of the Powershell class by specifying an InitialSessionState, do not update the 'IsRunspaceOwner' property. · Issue #6422 · PowerShell/PowerShell
Description: When I create an instance of the Powershell class by specifying an InitialSessionState, the 'IsRunspaceOwner' property is not updated. Steps to reproduce try { $InitialSessionState= [System.Management.Automation.Runspaces.InitialSessionS...
Open Graph Description: When I create an instance of the Powershell class by specifying an InitialSessionState, the 'IsRunspaceOwner' property is not updated. Steps to reproduce try { $InitialSessionState= [System.Managem...
X Description: When I create an instance of the Powershell class by specifying an InitialSessionState, the 'IsRunspaceOwner' property is not updated. Steps to reproduce try { $InitialSessionState= [System...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6422
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The creation of an instance of the Powershell class by specifying an InitialSessionState, do not update the 'IsRunspaceOwner' property.","articleBody":"When I create an instance of the Powershell class by specifying an InitialSessionState, the 'IsRunspaceOwner' property is not updated.\r\n\r\nSteps to reproduce\r\n------------------\r\n```powershell\r\ntry {\r\n $InitialSessionState= [System.Management.Automation.Runspaces.InitialSessionState]::Create()\r\n \r\n $SessionStateCmdletEntry = New-Object System.Management.Automation.Runspaces.SessionStateCmdletEntry 'Get-ChildItem','Microsoft.PowerShell.Commands.GetChildItemCommand',$null\r\n $InitialSessionState.Commands.Add($SessionStateCmdletEntry)\r\n\r\n $Provider = New-Object System.Management.Automation.Runspaces.SessionStateProviderEntry 'FileSystem',([Microsoft.PowerShell.Commands.FileSystemProvider]),$null\r\n $InitialSessionState.Providers.Add($Provider)\r\n\r\n $PS = [PowerShell]::Create($InitialSessionState)\r\n Write-Warning \"Automatic release : $($ps.IsRunspaceOwner)\"\r\n $PS.AddCommand(\"Get-ChildItem\") > $null\r\n $Results = $PS.Invoke() \r\n Write-Warning \"Automatic release : $($ps.IsRunspaceOwner)\"\r\n\r\n}\r\nfinally {\r\n $PS.Dispose()\r\n}\r\n$PS.Runspace\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```none\r\nWARNING: Automatic release : False\r\nWARNING: Automatic release : True\r\n\r\n Id Name ComputerName Type State Availability\r\n -- ---- ------------ ---- ----- ------------\r\n 2 Runspace2 localhost Local Closed None\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\n#WARNING: Automatic release : False\r\n#WARNING: Automatic release : False\r\n\r\n$PS.Runspace\r\n\r\n# Id Name ComputerName Type State Availability\r\n# -- ---- ------------ ---- ----- ------------\r\n# 2 Runspace2 localhost Local Opened Available\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.0.2\r\nPSEdition Core\r\nGitCommitId v6.0.2\r\nOS Microsoft Windows 6.1.7601 S\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.2}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\nSame error with Windows Powershell : \r\n```\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 5.1.14409.1012\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14409.1012}\r\nBuildVersion 10.0.14409.1012\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n```","author":{"url":"https://github.com/LaurentDardenne","@type":"Person","name":"LaurentDardenne"},"datePublished":"2018-03-18T09:09:25Z","url":"https://github.com/PowerShell/PowerShell/issues/6422"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7a2e744a-acfc-9bcb-6a93-9ee80908b542 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91B0:1B31E5:128376:19A1CB:6AFD025C |
| html-safe-nonce | b53d810e3d4a621e713efc9e2eee31001930838b03b030863814b940e377f247 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUIwOjFCMzFFNToxMjgzNzY6MTlBMUNCOjZBRkQwMjVDIiwidmlzaXRvcl9pZCI6IjI2NDc4NDU1MDkwOTc3MjM4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 50084fd596155a8a05c792abd9e3aaec9e7a64fc1e9d03552eeca36f1a48182e |
| hovercard-subject-tag | issue:306224380 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6422/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f0cc1f95ed1d83600da90c1cf6c1bd1dda80243190e12f4faa5efa9b7690b22/PowerShell/PowerShell/issues/6422 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f0cc1f95ed1d83600da90c1cf6c1bd1dda80243190e12f4faa5efa9b7690b22/PowerShell/PowerShell/issues/6422 |
| og:image:alt | When I create an instance of the Powershell class by specifying an InitialSessionState, the 'IsRunspaceOwner' property is not updated. Steps to reproduce try { $InitialSessionState= [System.Managem... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LaurentDardenne |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8fd5a24ae29aa78df114eaaf1f9a839e8c3b7c0d27549e4f54678bb7cf3166d4 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd0990b833f227378ab84f1d9519db1a04660550 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width