Title: Wrong output for New-Service in variable assignment and -OutVariable · Issue #10443 · PowerShell/PowerShell · GitHub
Open Graph Title: Wrong output for New-Service in variable assignment and -OutVariable · Issue #10443 · PowerShell/PowerShell
X Title: Wrong output for New-Service in variable assignment and -OutVariable · Issue #10443 · PowerShell/PowerShell
Description: New-Service cmdlet's output doesn't have all properties when assigned to a variable or using -OutVariable Steps to reproduce ♥->New-Service -Name TestService -BinaryPathName C:\windows\system32\cmd.exe -DisplayName test1 -Description tes...
Open Graph Description: New-Service cmdlet's output doesn't have all properties when assigned to a variable or using -OutVariable Steps to reproduce ♥->New-Service -Name TestService -BinaryPathName C:\windows\system32\cmd...
X Description: New-Service cmdlet's output doesn't have all properties when assigned to a variable or using -OutVariable Steps to reproduce ♥->New-Service -Name TestService -BinaryPathName C:\windows\s...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10443
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong output for New-Service in variable assignment and -OutVariable","articleBody":"`New-Service` cmdlet's output doesn't have all properties when assigned to a variable or using `-OutVariable`\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n♥->New-Service -Name TestService -BinaryPathName C:\\windows\\system32\\cmd.exe -DisplayName test1 -Description test1 -StartupType Manual -OutVariable r\r\n\r\nStatus Name DisplayName\r\n------ ---- -----------\r\nStopped TestService test1\r\n\r\n♥->$r\r\n\r\n#And \r\n\r\n♥->$r = New-Service -Name TestService -BinaryPathName C:\\windows\\system32\\cmd.exe -DisplayName test1 -Description test1 -StartupType Manual\r\n♥->$r\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\n♥->$r\r\n\r\nStatus Name DisplayName\r\n------ ---- -----------\r\nStopped TestService test1\r\n\r\n#And \r\n\r\n♥->$r\r\n\r\nStatus Name DisplayName\r\n------ ---- -----------\r\nStopped TestService test1\r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\n♥->$r\r\n\r\nStatus Name DisplayName\r\n------ ---- -----------\r\n TestService test1\r\n\r\n#And\r\n\r\n♥->$r\r\n\r\nStatus Name DisplayName\r\n------ ---- -----------\r\n\r\n```\r\n\r\n# Environment data\r\n\r\n```none\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-preview.3\r\nPSEdition Core\r\nGitCommitId 7.0.0-preview.3\r\nOS Microsoft Windows 10.0.18956\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","author":{"url":"https://github.com/kvprasoon","@type":"Person","name":"kvprasoon"},"datePublished":"2019-08-25T11:02:04Z","url":"https://github.com/PowerShell/PowerShell/issues/10443"}
| 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:206baebb-be35-0de0-5ce9-f8977b2df5a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E51A:1F8AF4:1DFCFC:28876C:6AFD5045 |
| html-safe-nonce | 9373d05a02bf472101d5094498f5dc6ea911560216dec9523c33af48ec54176e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTFBOjFGOEFGNDoxREZDRkM6Mjg4NzZDOjZBRkQ1MDQ1IiwidmlzaXRvcl9pZCI6IjgwMjQzMTgzOTMzOTU3OTM5ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 14f8d27b7fe380ab17ac6d7163b54c10fbda96c47aeb8c2cde8c698464b74c86 |
| hovercard-subject-tag | issue:484918083 |
| 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/10443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed13e3750cebfc1ea5c04a0a2cd8f1f5e553c348c775c8d636ab1c43a3f47961/PowerShell/PowerShell/issues/10443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed13e3750cebfc1ea5c04a0a2cd8f1f5e553c348c775c8d636ab1c43a3f47961/PowerShell/PowerShell/issues/10443 |
| og:image:alt | New-Service cmdlet's output doesn't have all properties when assigned to a variable or using -OutVariable Steps to reproduce ♥->New-Service -Name TestService -BinaryPathName C:\windows\system32\cmd... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kvprasoon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width