Just recently I discovered, when executing the Update-Help cmdlet in WSL 2, that it doesn’t do anything.
Behavior: Run with no progress bar and no error messages at the end of the process.
I have reported in the PowerShell Github repository and it will be addressed to the proper product group. This is on Windows 10 Version 2004, including Windows 10 Insider edition.
There are two workarounds to this issue:
Workaround #1
The workaround is shown below, thanks to Aditya Patwardhan (Microsoft PowerShell Developer) who provide the hint.
There are two Linux Bash environment variables that need to be updated: LANG and LC_ALL.
Check the current values using the echo command and, in my case, it shows:
## Current values: (base) maxt@sapien01:~$ echo $LANG C.UTF-8 (base) maxt@sapien01:~$ echo $LC_ALL -EMPTY- (base) maxt@sapien01:~$
Use the following “export” commands to change their values to be “en_US.UTF-8“:
(base) maxt@sapien01:~$ (base) maxt@sapien01:~$ export LC_ALL='en_US.UTF-8' (base) maxt@sapien01:~$ export LANG='en_US.UTF-8' (base) maxt@sapien01:~$ (base) maxt@sapien01:~$ echo $LC_ALL en_US.UTF-8 (base) maxt@sapien01:~$ echo $LANG en_US.UTF-8 (base) maxt@sapien01:~$
This will fix the issue temporarily during your WSL session, and the Update-Help will work properly.
For now, it may be needed to add these “export …” lines to the “~/.bashrc” file until the fix is available.
Workaround #2
Simply use the “Update-Help” specifying the UIculture:
Update-Help -uiculture en-us
That’s it!!
Keep PowerShelling!