Zend certified PHP/Magento developer

After Windows 11 22H2 update, wsl command stopped working from PowerShell, still available from cmd.exe

Just after the 22H2 update, I opened up WSL to set up a @reboot cron task in my Ubuntu environment. WSL opened without any problems.

I wanted to reboot WSL from PowerShell to make sure my crontab change had worked, and this was the result:

PowerShell screenshot

This didn’t slow me down for long, however, because good-ol’ cmd.exe happily obliged. This made me wonder where the wsl command lives.

Command Prompt screenshot

I haven’t found a clear way to fix this, but from what I have found I guess the problem has to do with PowerShell favoring 64-bit code over 32-bit… perhaps to the point that it doesn’t even want to look in the old WindowsSystem32 directory for anything?

My system path includes %SystemRoot%System32, and I don’t see any sign that PowerShell now uses a different command path, so I’m not sure how to fix this.