Powershell V5.0 中缺少帮助文件 [英] Missing Help Files in Powershell V5.0

查看:78
本文介绍了Powershell V5.0 中缺少帮助文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Powershell 版本:5.0.10586.494

Powershell Version: 5.0.10586.494

我这个周末刚开始使用powershell,发现在使用shell时找不到任何帮助文件,例如,我想阅读about_Comparison_Operators帮助文件,但似乎控制台找不到它.

I just began working with powershell this weekend and I discovered that I cannot find any help files when using the shell, for example, I was looking to read the about_Comparison_Operators help file but it seems as though the console cannot find it.

执行时:Get-Help About_* 我得到的唯一结果是 About_CimSession... 好像没有其他帮助文件?

When doing: Get-Help About_* the only result I get is About_CimSession... it seems like there are no other help files?

这篇 TechNet 文章 建议在 Powershell v3 中模块必须是进口,

This TechNet article suggests that in Powershell v3 the module must be imported,

要下载或更新 Windows PowerShell 3.0 中某个模块的帮助文件,请使用 Update-Help cmdlet.

To download or update the help files for a module in Windows PowerShell 3.0, use the Update-Help cmdlet.

我不知道我的情况是否一样?我已经使用了 update-help cmdlet(以管理员身份),但它似乎对帮助文件没有影响.

I don't know if it's the same deal in my case? I've used the update-help cmdlet (as admin) and it does not seem to effect the help files.

谢谢!

忘了提,我在尝试更新帮助时一直以管理员身份运行 PS.这运行没有错误,但帮助文件保持不变.

Forgot to mention, I've been running PS as admin while trying to update help. This runs without error, but the help files remain untouched.

更新:仍然没有运气,尝试通过使用 UICulture 参数指定语言来更新帮助,但这没有任何区别.如果我找到修复,我会更新这篇文章.

UPDATE: Still no luck, tried updating help by specifying language using the UICulture parameter but this didn't make a difference. Will keep this post updated if I find a fix.

推荐答案

更新:PowerShell 可更新帮助不再损坏.About_ 帮助文件现在以正确的扩展名下载.然而,这些纯文本文件的格式仍然不等于旧版本.

Update: PowerShell updatable help is no longer broken. About_ helpfiles are now downloaded with the correct extension. The formatting of these plaintext files still doesn't equal the old versions, however.

PowerShell 可更新帮助目前已损坏.PS5 不附带那些 about_* 帮助文件,如果您更新帮助以下载它们,它们不会以适当的文件扩展名存储,因此 get-help 不会读取它们.

PowerShell updatable help is currently broken. PS5 doesn't ship with those about_* helpfiles, and if you update-help to download them, they aren't stored with the appropriate file extension, so get-help doesn't read them.

最近才下载这些文件,所以如果您有一段时间没有尝试过,您仍然应该在提升的会话中执行 update-help -force.然后,请参阅将正确重命名文件的单行答案:https://superuser.com/a/1134681/4782

Only recently were these files being downloaded at all, so if you haven't tried in a while you should still do update-help -force in an elevated session. Then, see this answer for a one-liner that will rename the files correctly: https://superuser.com/a/1134681/4782

然而,由于(可能)不相关的问题,这些新的帮助文件的文本格式有些混乱,这使得在使用类似表格的布局时很难阅读.如果您想获取具有正确格式的 PS4 时代 about_* 文件并使用这些文件,可以在此处找到替代解决方案:https://github.com/kilasuit/Install-AboutHelp.请注意,此解决方案会将 about_* 文件的存档解压缩到 en\ 语言环境文件夹,该文件夹可能不是您的默认语言环境(例如,我的是 en-US\).这将正常工作,因为只要所需的文档存在于您的默认语言环境文件夹中,en\ 位置将用作后备.

However, due to a (probably) unrelated issue, these new help files have some mangled text formatting that makes them very difficult to read any time a table-like layout is being used. If you'd like instead to grab the PS4-era about_* files with proper formatting and use those instead, an alternative solution can be found here: https://github.com/kilasuit/Install-AboutHelp. Note that this solution will unzip an archive of about_* files to the en\ locale folder, which may not be your default locale (mine is en-US\, for example). This will work fine since the en\ location will be used as a fallback as long as the desired document doesn't exist in your default locale's folder.

进一步参考:

这篇关于Powershell V5.0 中缺少帮助文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆