Title: WSMan provider throws exception for non-existent path with -PathType Container · Issue #11278 · PowerShell/PowerShell · GitHub
Open Graph Title: WSMan provider throws exception for non-existent path with -PathType Container · Issue #11278 · PowerShell/PowerShell
X Title: WSMan provider throws exception for non-existent path with -PathType Container · Issue #11278 · PowerShell/PowerShell
Description: Steps to reproduce test-path wsman:\foo -pathtype container Expected behavior The command returns $false. Actual behavior Exception is thrown: "Test-Path: Value cannot be null. (Parameter 'value')": The $Error[1].Exception.InnerException...
Open Graph Description: Steps to reproduce test-path wsman:\foo -pathtype container Expected behavior The command returns $false. Actual behavior Exception is thrown: "Test-Path: Value cannot be null. (Parameter 'value')"...
X Description: Steps to reproduce test-path wsman:\foo -pathtype container Expected behavior The command returns $false. Actual behavior Exception is thrown: "Test-Path: Value cannot be null. (Parameter '...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11278
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WSMan provider throws exception for non-existent path with -PathType Container","articleBody":"# Steps to reproduce\r\n\r\n```powershell\r\ntest-path wsman:\\foo -pathtype container\r\n```\r\n\r\n# Expected behavior\r\n\r\nThe command returns `$false`.\r\n\r\n# Actual behavior\r\n\r\nException is thrown: \"Test-Path: Value cannot be null. (Parameter 'value')\":\r\n\r\n\r\n\r\nThe `$Error[1].Exception.InnerException.InnerException.StackTrace` (since `$Error[0]` is the error for `Invoke`) shows:\r\n```\r\n at System.String.StartsWith(String value, StringComparison comparisonType)\r\n at Microsoft.WSMan.Management.WSManConfigProvider.NormalizePath(String path, String host)\r\n at Microsoft.WSMan.Management.WSManConfigProvider.IsItemContainer(String path)\r\n at System.Management.Automation.SessionStateInternal.IsItemContainer(CmdletProvider providerInstance, String path, CmdletProviderContext context)\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-preview.6\r\nPSEdition Core\r\nGitCommitId 7.0.0-preview.6\r\nOS Microsoft Windows 10.0.18363\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/heaths","@type":"Person","name":"heaths"},"datePublished":"2019-12-06T18:31:00Z","url":"https://github.com/PowerShell/PowerShell/issues/11278"}
| 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:b7f0f231-8036-4ff3-8d26-cf2e060b2eac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E546:18D3A1:50877:6FFDB:6AFD48D9 |
| html-safe-nonce | 9c6d522e0d50c1000598a66a1da7fa06ca41e366a3dc120cf8dc34a28b83dcf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQ2OjE4RDNBMTo1MDg3Nzo2RkZEQjo2QUZENDhEOSIsInZpc2l0b3JfaWQiOiIyMDAxNTk1ODgxNDcxNDI4ODI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | aee9b0fddc7fd901d313c429886b570625a08e050c2eadaa72da025dcf498e04 |
| hovercard-subject-tag | issue:534194740 |
| 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/11278/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e04105b3a0c5ad2e816c88f22b2b5a8f758f7a581ec8d4f35442e3eca7d4ad1d/PowerShell/PowerShell/issues/11278 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e04105b3a0c5ad2e816c88f22b2b5a8f758f7a581ec8d4f35442e3eca7d4ad1d/PowerShell/PowerShell/issues/11278 |
| og:image:alt | Steps to reproduce test-path wsman:\foo -pathtype container Expected behavior The command returns $false. Actual behavior Exception is thrown: "Test-Path: Value cannot be null. (Parameter 'value')"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | heaths |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| 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 | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width