Get-Help does not work
Closed this issue · 5 comments
Hi,
this does not work the way the book describes it. I ran Update-Help
as root
and it did something. But Get-Help Write-Host
says it cannot find the help files. Fedora 30.
[oppa@oppa-labor ~]$ pwsh
PowerShell 6.2.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /home/oppa> Get-Help Write-Host
NAME
Write-Host
SYNTAX
Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>]
[-ForegroundColor {Black | DarkBlue | DarkGreen | DarkCyan | DarkRed |
DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red |
Magenta | Yellow | White}] [-BackgroundColor {Black | DarkBlue | DarkGreen
| DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray | DarkGray | Blue |
Green | Cyan | Red | Magenta | Yellow | White}] [<CommonParameters>]
ALIASES
None
REMARKS
Get-Help cannot find the Help files for this cmdlet on this computer. It
is displaying only partial help.
-- To download and install Help files for the module that includes
this cmdlet, use Update-Help.
-- To view the Help topic for this cmdlet online, type: "Get-Help
Write-Host -Online" or
go to https://go.microsoft.com/fwlink/?LinkID=113426.
PS /home/oppa>
Hello! Apologies, I must have missed this email. I just tried performing a fresh install of PowerShell and trying out the same cmdlet. It worked except for PSDesiredStateConfiguration
help complaining about the language installed on my computer (en-GB as opposed to en-US).
Just to make sure we're on the same page, you ran sudo pwsh
and then ran Update-Help
from within that session, correct?
Hey Stephan, are you still facing this issue? If so, please run $PSVersionTable
and share the output. Also, what language and locale have you set on your computer? We'll need to see if the module has help info in the locale you've set.
Hi,
working fine for a while now. Don't remember what I did or it sorting itself with an update.
`[oppa@oppa-labor ~]$ sudo pwsh
[sudo] Passwort für oppa:
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
PS /home/oppa> Update-Help
PS /home/oppa> Get-Help Write-Host NAME Write-Host
SYNOPSIS
Writes customized output to a host.
SYNTAX
Write-Host [[-Object] ] [-BackgroundColor {Black | DarkBlue |
DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray |
DarkGray | Blue | Green | Cyan | Red | Magenta | Yellow | White}]
[-ForegroundColor {Black | DarkBlue | DarkGreen | DarkCyan | DarkRed |
DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red |
Magenta | Yellow | White}] [-NoNewline] [-Separator ]
[]
DESCRIPTION
The Write-Host
cmdlet customizes output. You can specify the color of
text by using the ForegroundColor
parameter, and you can specify the
background color by using the BackgroundColor
parameter. The Separator
parameter lets you specify a string to use to separate displayed objects.
The particular result depends on the program that is hosting PowerShell.
> [!NOTE] > Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper
for `Write-Information` > This allows you to use `Write-Host` to emit
output to the information stream. > This enables the capture or
suppression of data written using `Write-Host` while preserving backwards
compatibility. > > The `$InformationPreference` preference variable and
`InformationAction` common parameter do not affect `Write-Host` messages.
> The exception to this rule is `-InformationAction Ignore`, which
effectively suppresses `Write-Host` output. (see "Example 5")
RELATED LINKS
Online Version: https://docs.microsoft.com/powershell/module/microsoft.powe
rshell.utility/write-host?view=powershell-6&WT.mc_id=ps-gethelp
Clear-Host
Out-Host
Write-Debug
Write-Error
Write-Output
Write-Progress
Write-Verbose
Write-Warning
REMARKS
To see the examples, type: "Get-Help Write-Host -Examples"
For more information, type: "Get-Help Write-Host -Detailed"
For technical information, type: "Get-Help Write-Host -Full"
For online help, type: "Get-Help Write-Host -Online"
PS /home/oppa>
`
Oh, that's great to know! What it seems like is that the help content was not updated for that particular module at the time. I also saw a few other issues created within the PowerShell repository itself, as well as other places---similar error. Either an update fixed it, or you found a solution elsewhere and don't remember what you did.
If you do remember the steps later on, please do share. I use en-GB at home, and that's unlikely to cause such issues. Inputs from users of other locales will help.
Have a good one!