Title: 7.4.0 Start-Process with -PassThru & -RedirectStandardOutput does not return the process object completely ( properties like Exitcode ) · Issue #20716 · PowerShell/PowerShell · GitHub
Open Graph Title: 7.4.0 Start-Process with -PassThru & -RedirectStandardOutput does not return the process object completely ( properties like Exitcode ) · Issue #20716 · PowerShell/PowerShell
X Title: 7.4.0 Start-Process with -PassThru & -RedirectStandardOutput does not return the process object completely ( properties like Exitcode ) · Issue #20716 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/20716
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"7.4.0 Start-Process with -PassThru \u0026 -RedirectStandardOutput does not return the process object completely ( properties like Exitcode )","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nWhen i use Start-Process with -PassThru \u0026 -RedirectStandardOutput , the process object is not returned completely. This has been since 7.4.0\r\n\r\n\r\n### Expected behavior\r\n\r\n```console\r\nThis was the 7.3.9 behavior:\r\n\r\nPS C:\\Users\\thiscouldbeme\u003e $Process = start-process notepad -PassThru -wait -RedirectStandardOutput c:\\temp\\sa.txt\r\nPS C:\\Users\\thiscouldbeme\u003e $Process | Select *\r\n\r\nName :\r\nId : 33776\r\nPriorityClass :\r\nFileVersion :\r\nHandleCount :\r\nWorkingSet :\r\nPagedMemorySize :\r\nPrivateMemorySize :\r\nVirtualMemorySize :\r\nTotalProcessorTime : 00:00:00\r\nSI :\r\nHandles :\r\nVM :\r\nWS :\r\nPM :\r\nNPM :\r\nPath :\r\nCommandLine :\r\nParent : System.Diagnostics.Process (pwsh)\r\nCompany :\r\nCPU : 0\r\nProductVersion :\r\nDescription :\r\nProduct :\r\n__NounName : Process\r\nSafeHandle : Microsoft.Win32.SafeHandles.SafeProcessHandle\r\nHandle : 2500\r\nBasePriority :\r\nExitCode : 0\r\nHasExited : True\r\nStartTime : 17-11-2023 18:31:48\r\nExitTime : 17-11-2023 18:31:50\r\nMachineName : .\r\nMaxWorkingSet :\r\nMinWorkingSet :\r\nModules :\r\nNonpagedSystemMemorySize64 :\r\nNonpagedSystemMemorySize :\r\nPagedMemorySize64 :\r\nPagedSystemMemorySize64 :\r\nPagedSystemMemorySize :\r\nPeakPagedMemorySize64 :\r\nPeakPagedMemorySize :\r\nPeakWorkingSet64 :\r\nPeakWorkingSet :\r\nPeakVirtualMemorySize64 :\r\nPeakVirtualMemorySize :\r\nPriorityBoostEnabled :\r\nPrivateMemorySize64 :\r\nProcessorAffinity :\r\nSessionId :\r\nStartInfo :\r\nThreads :\r\nVirtualMemorySize64 :\r\nEnableRaisingEvents : False\r\nStandardInput :\r\nStandardOutput :\r\nStandardError :\r\nWorkingSet64 :\r\nSynchronizingObject :\r\nMainModule :\r\nPrivilegedProcessorTime : 00:00:00\r\nUserProcessorTime : 00:00:00\r\nProcessName :\r\nMainWindowHandle : 0\r\nMainWindowTitle :\r\nResponding : True\r\nSite :\r\nContainer :\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nPS C:\\Windows\\System32\u003e $Process = start-process notepad -PassThru -wait -RedirectStandardOutput c:\\temp\\sa.txt\r\nPS C:\\Windows\\System32\u003e $Process | Select *\r\n\r\nName :\r\nId : 3264\r\nPriorityClass :\r\nFileVersion :\r\nHandleCount :\r\nWorkingSet :\r\nPagedMemorySize :\r\nPrivateMemorySize :\r\nVirtualMemorySize :\r\nTotalProcessorTime :\r\nSI :\r\nHandles :\r\nVM :\r\nWS :\r\nPM :\r\nNPM :\r\nPath :\r\nCommandLine :\r\nParent :\r\nCompany :\r\nCPU :\r\nProductVersion :\r\nDescription :\r\nProduct :\r\n__NounName : Process\r\nSafeHandle :\r\nHandle :\r\nBasePriority :\r\nExitCode :\r\nHasExited : True\r\nStartTime :\r\nExitTime :\r\nMachineName : .\r\nMaxWorkingSet :\r\nMinWorkingSet :\r\nModules :\r\nNonpagedSystemMemorySize64 :\r\nNonpagedSystemMemorySize :\r\nPagedMemorySize64 :\r\nPagedSystemMemorySize64 :\r\nPagedSystemMemorySize :\r\nPeakPagedMemorySize64 :\r\nPeakPagedMemorySize :\r\nPeakWorkingSet64 :\r\nPeakWorkingSet :\r\nPeakVirtualMemorySize64 :\r\nPeakVirtualMemorySize :\r\nPriorityBoostEnabled :\r\nPrivateMemorySize64 :\r\nProcessorAffinity :\r\nSessionId :\r\nStartInfo :\r\nThreads :\r\nVirtualMemorySize64 :\r\nEnableRaisingEvents : False\r\nStandardInput :\r\nStandardOutput :\r\nStandardError :\r\nWorkingSet64 :\r\nSynchronizingObject :\r\nMainModule :\r\nPrivilegedProcessorTime :\r\nUserProcessorTime :\r\nProcessName :\r\nMainWindowHandle : 0\r\nMainWindowTitle :\r\nResponding : True\r\nSite :\r\nContainer :\r\n```\r\n\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```powershell\r\nName Value\r\n---- -----\r\nPSVersion 7.4.0\r\nPSEdition Core\r\nGitCommitId 7.4.0\r\nOS Microsoft Windows 10.0.20348\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/derkveenhof","@type":"Person","name":"derkveenhof"},"datePublished":"2023-11-17T17:33:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/20716/PowerShell/issues/20716"}
| 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:e8c5a270-3e2d-38b9-cc13-10215f297aab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2E2:215E98:CBB5A4:1284E81:6A54BACE |
| html-safe-nonce | 0fcfec050f85a0eafcc7f2f95d30e67cd1a73499982482964aad5a385e220358 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkUyOjIxNUU5ODpDQkI1QTQ6MTI4NEU4MTo2QTU0QkFDRSIsInZpc2l0b3JfaWQiOiIyNDA1NjM4Mzk3MTg2MzI1MTk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | feca34de522bc5deba561ecaf0e357f52032a2860c10a0f6511ce8c122b11fdc |
| hovercard-subject-tag | issue:1999620284 |
| 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/20716/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58bc663dea8cc86de13984e7ad6ca5df605e8c6d169bbdc4fea0267646afb058/PowerShell/PowerShell/issues/20716 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58bc663dea8cc86de13984e7ad6ca5df605e8c6d169bbdc4fea0267646afb058/PowerShell/PowerShell/issues/20716 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | derkveenhof |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 69f9664dd5e7a82ba8ab1b4cb7f5a2f09333ab38 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width