Title: Get-Command doesn't recognize System.Management.Automation.CommandInfo (its own output type) as pipeline input · Issue #10851 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-Command doesn't recognize System.Management.Automation.CommandInfo (its own output type) as pipeline input · Issue #10851 · PowerShell/PowerShell
X Title: Get-Command doesn't recognize System.Management.Automation.CommandInfo (its own output type) as pipeline input · Issue #10851 · PowerShell/PowerShell
Description: Feeding Get-Command output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection - doesn't work as expected. It looks like a new parameter set with a System.Management.Automation.Com...
Open Graph Description: Feeding Get-Command output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection - doesn't work as expected. It looks like a new parameter set...
X Description: Feeding Get-Command output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection - doesn't work as expected. It looks like a new parameter...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10851
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Command doesn't recognize System.Management.Automation.CommandInfo (its own output type) as pipeline input","articleBody":"Feeding `Get-Command` output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection - doesn't work as expected.\r\n\r\nIt looks like a new parameter set with a `System.Management.Automation.CommandInfo`-typed parameter would have to be introduced to support that.\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n# OK\r\n('Add-Content', 'Get-Content' | Get-Command).Name | Should -Be 'Add-Content', 'Get-Content'\r\n\r\n# Fails\r\n(Get-Command 'Add-Content', 'Get-Content' | Get-Command).Name | Should -Be 'Add-Content', 'Get-Content'\r\n```\r\n\r\n# Expected behavior\r\n\r\nBoth tests should succeed.\r\n\r\n# Actual behavior\r\n\r\nThe 2nd test fails, because the only `CommandInfo` object output is the one for `Add-Content`\r\n\r\n```none\r\nExpected @('Add-Content', 'Get-Content'), but got 'Add-Content'\r\n```\r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 7.0.0-preview.4\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-10-20T15:06:19Z","url":"https://github.com/PowerShell/PowerShell/issues/10851"}
| 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:cbf8adc1-d39a-7730-f375-8d1f3e355f9a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC9A:D97B:162B67:1E6560:6AFD4D91 |
| html-safe-nonce | c26f6034200ac1ab5604783cf280a9ce64bb5910382a5ef32160f5c934a96699 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzlBOkQ5N0I6MTYyQjY3OjFFNjU2MDo2QUZENEQ5MSIsInZpc2l0b3JfaWQiOiI3NDc5NjEzNTU5ODMyMTM3MTA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bf5fbf175b573e5e3a968225ea554b427468f6d3841c10f0e965628f5a2b6d2b |
| hovercard-subject-tag | issue:509607288 |
| 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/10851/issue_layout |
| twitter:image | https://opengraph.githubassets.com/96cc1a9093a16876c5bc5257149cbedebef4b0affdd7e476c51a2309204d4189/PowerShell/PowerShell/issues/10851 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/96cc1a9093a16876c5bc5257149cbedebef4b0affdd7e476c51a2309204d4189/PowerShell/PowerShell/issues/10851 |
| og:image:alt | Feeding Get-Command output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection - doesn't work as expected. It looks like a new parameter set... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| 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