Title: AppX package installation locations cannot be targeted with Get-Item / Get-ChildItem · Issue #11013 · PowerShell/PowerShell · GitHub
Open Graph Title: AppX package installation locations cannot be targeted with Get-Item / Get-ChildItem · Issue #11013 · PowerShell/PowerShell
X Title: AppX package installation locations cannot be targeted with Get-Item / Get-ChildItem · Issue #11013 · PowerShell/PowerShell
Description: This is a regression from Windows PowerShell. On Windows, AppX packages (for in-box applications such as Calculator) are installed in subfolders of hidden folder $env:ProgramFiles\WindowsApps PowerShell Core cannot locate these folders, ...
Open Graph Description: This is a regression from Windows PowerShell. On Windows, AppX packages (for in-box applications such as Calculator) are installed in subfolders of hidden folder $env:ProgramFiles\WindowsApps Power...
X Description: This is a regression from Windows PowerShell. On Windows, AppX packages (for in-box applications such as Calculator) are installed in subfolders of hidden folder $env:ProgramFiles\WindowsApps Power...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11013
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AppX package installation locations cannot be targeted with Get-Item / Get-ChildItem","articleBody":"This is a regression from Windows PowerShell.\r\n\r\nOn Windows, AppX packages (for in-box applications such as Calculator) are installed in subfolders of hidden folder `$env:ProgramFiles\\WindowsApps`\r\n\r\nPowerShell Core cannot locate these folders, not even with `-Force` (which shouldn't be necessary, because it is only the parent folder that is hidden).\r\n\r\nCuriously, you _can_ target _files inside_ those folders, though only by _literal_ name.\r\n\r\nThe problem may be related to permissions.\r\n\r\n# Steps to reproduce\r\n\r\nRun the following on Windows:\r\n\r\n```powershell\r\n$pkgDir = (Get-AppxPackage Microsoft.WindowsCalculator).InstallLocation\r\n\r\n# OK, because a file *inside* the dir. is targeted by literal name.\r\n{ Get-Item -EA Stop -Force $pkgDir\\Calculator.exe } | Should -Not -Throw\r\n\r\n# Targeting the dir. directly fails:\r\n{ Get-Item -EA Stop -Force -LiteralPath $pkgDir } | Should -Not -Throw\r\n{ Get-ChildItem -EA Stop -Force -LiteralPath $pkgDir } | Should -Not -Throw\r\n\r\n# Using a wildcard produces no output.\r\n# (This problem, unlike the others, also occurs in Windows PowerShell).\r\nGet-ChildItem -Force -Path $pkgDir* | Should -Not -BeNullOrEmpty\r\n```\r\n\r\n# Expected behavior\r\n\r\nAll tests should pass.\r\n\r\n# Actual behavior\r\n\r\nAll tests but the first fail, because the directory itself cannot be targeted:\r\n\r\n```none\r\n\"Cannot find path 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsCalculator_10.1908.0.0_x64__8wekyb3d8bbwe' because it does not exist.\"\r\n```\r\n\r\nThe wildcard-based command produces no output.\r\n\r\n\r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 7.0.0-preview.5\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-11-07T14:58:37Z","url":"https://github.com/PowerShell/PowerShell/issues/11013"}
| 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:a01acee6-303c-214f-ef0c-d6daf5fda695 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3CC:9A536:24DB0E3:338474E:6AFD4484 |
| html-safe-nonce | 6e6a362f3ebce1f95f4434f3edcd77821cf82006cd4d78b2ff19cebe2d7057b1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0NDOjlBNTM2OjI0REIwRTM6MzM4NDc0RTo2QUZENDQ4NCIsInZpc2l0b3JfaWQiOiI3OTc4ODQ3OTc4MzU5OTY0ODA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 404ecb64a9464ac9f64849bbf7932416c9bdbc4b390b3e2aaabf19b03f89774d |
| hovercard-subject-tag | issue:519318979 |
| 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/11013/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ffa8f138f7e141c3af0345be49332ed8b4d284a4690bb9fef501f4cf2a48c1fc/PowerShell/PowerShell/issues/11013 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ffa8f138f7e141c3af0345be49332ed8b4d284a4690bb9fef501f4cf2a48c1fc/PowerShell/PowerShell/issues/11013 |
| og:image:alt | This is a regression from Windows PowerShell. On Windows, AppX packages (for in-box applications such as Calculator) are installed in subfolders of hidden folder $env:ProgramFiles\WindowsApps Power... |
| 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 | 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