Title: powershell.exe started from pwsh.exe give preference to pwsh modules and fails module version compatiblity check · Issue #7324 · PowerShell/PowerShell · GitHub
Open Graph Title: powershell.exe started from pwsh.exe give preference to pwsh modules and fails module version compatiblity check · Issue #7324 · PowerShell/PowerShell
X Title: powershell.exe started from pwsh.exe give preference to pwsh modules and fails module version compatiblity check · Issue #7324 · PowerShell/PowerShell
Description: Windows PowerShell started from a pwsh.exe from preview.4 gives preference to pwsh module path. As an effect, module load fails with Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand Steps to reprodu...
Open Graph Description: Windows PowerShell started from a pwsh.exe from preview.4 gives preference to pwsh module path. As an effect, module load fails with Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Comma...
X Description: Windows PowerShell started from a pwsh.exe from preview.4 gives preference to pwsh module path. As an effect, module load fails with Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Comma...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7324
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"powershell.exe started from pwsh.exe give preference to pwsh modules and fails module version compatiblity check","articleBody":"Windows PowerShell started from a pwsh.exe from preview.4 gives preference to pwsh module path.\r\nAs an effect, module load fails with `Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand`\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\nPS D:\\> powershell\r\nWindows PowerShell\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nPS D:\\> Write-Verbose \"Test\" -verbose\r\nWrite-Verbose : The 'Write-Verbose' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not be loaded. For more information, run 'Import-Module\r\nMicrosoft.PowerShell.Utility'.\r\nAt line:1 char:1\r\n+ Write-Verbose \"Test\" -verbose\r\n+ ~~~~~~~~~~~~~\r\n + CategoryInfo : ObjectNotFound: (Write-Verbose:String) [], CommandNotFoundException\r\n + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule\r\n\r\nPS D:\\> Import-Module Microsoft.PowerShell.Utility\r\nImport-Module : The version of Windows PowerShell on this computer is '5.1.18200.1000'. The module 'C:\\program\r\nfiles\\powershell\\6-preview\\Modules\\Microsoft.PowerShell.Utility\\Microsoft.PowerShell.Utility.psd1' requires a minimum Windows PowerShell version of '6.1' to run. Verify that you have the minimum\r\nrequired version of Windows PowerShell installed, and then try again.\r\nAt line:1 char:1\r\n+ Import-Module Microsoft.PowerShell.Utility\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : ResourceUnavailable: (C:\\program file...ll.Utility.psd1:String) [Import-Module], InvalidOperationException\r\n + FullyQualifiedErrorId : Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand\r\n```\r\n\r\n**Workaround**\r\nAfter starting Windows PowerShell adjust the PSModulePath\r\n\r\n```PowerShell\r\n$env:Psmodulepath = \"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules;$env:PSModulePath\"\r\n```\r\n\r\ncc @rjmholt \r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```none\r\nWrite-Verbose should work\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\nModules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.1.0-preview.4\r\nPSEdition Core\r\nGitCommitId 6.1.0-preview.4\r\nOS Microsoft Windows 10.0.18200\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/adityapatwardhan","@type":"Person","name":"adityapatwardhan"},"datePublished":"2018-07-20T21:29:57Z","url":"https://github.com/PowerShell/PowerShell/issues/7324"}
| 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:70b6041e-46a3-6c89-2b4d-abe607e4d46f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D81A:11BFC:245856D:32AA098:6AFD3C99 |
| html-safe-nonce | c1d91121a1c82ecdabf278f8b747b93f0b11ad12bfa6aa1148f5803a12a447fc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODFBOjExQkZDOjI0NTg1NkQ6MzJBQTA5ODo2QUZEM0M5OSIsInZpc2l0b3JfaWQiOiI3OTQyMDE5NzU5MDc4MTk0MzI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a611f7ac4f9eed9b43f946daf09cbefb8a11ac1b0360b2a0c4d8e60507854b9a |
| hovercard-subject-tag | issue:343253137 |
| 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/7324/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2295df719bb447ec324aa6db52331a7d218de27f5f5b762ca8a4a319d7e24550/PowerShell/PowerShell/issues/7324 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2295df719bb447ec324aa6db52331a7d218de27f5f5b762ca8a4a319d7e24550/PowerShell/PowerShell/issues/7324 |
| og:image:alt | Windows PowerShell started from a pwsh.exe from preview.4 gives preference to pwsh module path. As an effect, module load fails with Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Comma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adityapatwardhan |
| 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