pwsh -c 'Get-Module' not work on new version of WSL linux kernel (5.10.102.1-microsoft-standard-WSL2)
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Start a bash shell in Ubuntu (using WSL in my case)
- Run: `pwsh -c ‘Get-Module’
Expected behavior
~:pwsh -c 'Get-Module'
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.9.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 6.0.1 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty…}
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Script 2.1.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler…}
Actual behavior
~:pwsh -c 'Get-Module'
~:
Error details
No error
Environment data
Name Value
---- -----
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
Troubleshooting Windows Subsystem for Linux
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >WSL 2 does not have /lib/modules - linux kernel
I had to do this for an assignment, so I figure I'll share my solution here. The base WSL2 kernel does not allow...
Read more >Ubuntu 22.04 LTS on WSL: "Failed to retrieve available ...
Every time I install new packages using sudo apt install , I will get 2 messages saying that: Failed to retrieve available kernel...
Read more >linux - How can I update the kernel in WSL2 kernel to latest ...
To be sure of getting updates to the WSL2 kernel: Open Settings > Update & recovery > Windows Update; Click on "Advanced options" ......
Read more >"usbipd not found for kernel" when using USB/IP with WSL
uspip is called by usbipd wsl attach -b 2-2 from PowerShell because I am trying to attach a USB device to Ubuntu; Kernel...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I propose to clarify the title
on new version of WSL linux kernel
. For example, in my case everything works with new kernel:In addition, the Linux kernel is too broad a concept to use without specifics. It can be vanilla or set up by maintainers for different distributions with different patches and settings.