Title: Improve error message for Get-Service with an invalid ComputerName · Issue #2747 · PowerShell/PowerShell · GitHub
Open Graph Title: Improve error message for Get-Service with an invalid ComputerName · Issue #2747 · PowerShell/PowerShell
X Title: Improve error message for Get-Service with an invalid ComputerName · Issue #2747 · PowerShell/PowerShell
Description: Filed on UserVoice: http://windowsserver.uservoice.com/forums/301869/suggestions/17193962 The error message for Get-Service returns a NoServiceFoundForGivenName exception even when the problem is an invalid -ComputerName, potentially mis...
Open Graph Description: Filed on UserVoice: http://windowsserver.uservoice.com/forums/301869/suggestions/17193962 The error message for Get-Service returns a NoServiceFoundForGivenName exception even when the problem is a...
X Description: Filed on UserVoice: http://windowsserver.uservoice.com/forums/301869/suggestions/17193962 The error message for Get-Service returns a NoServiceFoundForGivenName exception even when the problem is a...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2747
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve error message for Get-Service with an invalid ComputerName","articleBody":"Filed on UserVoice: http://windowsserver.uservoice.com/forums/301869/suggestions/17193962\r\n\r\nThe error message for `Get-Service` returns a `NoServiceFoundForGivenName` exception even when the problem is an invalid `-ComputerName`, potentially misleading the user. \r\n\r\nSteps to reproduce\r\n------------------\r\n```powershell\r\nGet-Service wuauserv -ComputerName MadeUpComputerName\r\n``` \r\n\r\nExpected behavior\r\n-----------------\r\n```\r\nGet-Service : Cannot find any computer with name 'MadeUpComputerName'.\r\nAt line:1 char:1\r\n+ Get-Service wuauserv -ComputerName MadeUpComputerName\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : ObjectNotFound: (wuauserv:String) [Get-Service], ServiceCommandExce\r\n ption\r\n + FullyQualifiedErrorId : SomeOtherExceptionForComputerNameNotFound,Microsoft.PowerShell.Commands.GetService\r\n Command\r\n```\r\n\r\n\r\nActual behavior\r\n---------------\r\n```\r\nGet-Service : Cannot find any service with service name 'wuauserv'.\r\nAt line:1 char:1\r\n+ Get-Service wuauserv -ComputerName MadeUpComputerName\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : ObjectNotFound: (wuauserv:String) [Get-Service], ServiceCommandExce\r\n ption\r\n + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetService\r\n Command\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\r\n```powershell\r\n> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSRemotingProtocolVersion 2.3\r\nPSVersion 6.0.0-alpha\r\nWSManStackVersion 3.0\r\nBuildVersion 3.0.0.0\r\nSerializationVersion 1.1.0.1\r\nPSEdition Core\r\nGitCommitId v6.0.0-alpha.12\r\nCLRVersion\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\n```\r\n","author":{"url":"https://github.com/joeyaiello","@type":"Person","name":"joeyaiello"},"datePublished":"2016-11-21T17:42:03Z","url":"https://github.com/PowerShell/PowerShell/issues/2747"}
| 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:32406bb5-0697-1210-c595-e389ebd3acef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89B6:3F6EA3:68D51:8C95E:6AFD8B05 |
| html-safe-nonce | 30fa0e42b385202c8852e6c594c68cfcc240550f37b5cd730ef32f21e891a07b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUI2OjNGNkVBMzo2OEQ1MTo4Qzk1RTo2QUZEOEIwNSIsInZpc2l0b3JfaWQiOiI4NzU3MzIzOTAwNDEwMjM1NjUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fc4f25cc366e32c6f926cb50797cb7be8397b75e5f81693c4e9c95a5d427952c |
| hovercard-subject-tag | issue:190787900 |
| 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/2747/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dfd616a73b9f665f222fefb61df3cfed151ae6f93d90e32d8a05e4d6838dcb9e/PowerShell/PowerShell/issues/2747 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dfd616a73b9f665f222fefb61df3cfed151ae6f93d90e32d8a05e4d6838dcb9e/PowerShell/PowerShell/issues/2747 |
| og:image:alt | Filed on UserVoice: http://windowsserver.uservoice.com/forums/301869/suggestions/17193962 The error message for Get-Service returns a NoServiceFoundForGivenName exception even when the problem is a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joeyaiello |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| 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 | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width