Update-Help

The Update-Help command can perform two tasks:

  • Update help files from the internet
  • Import previously saved help files

To update help from the internet, Update-Help may be run without any parameters:

Update-Help 
Administrator rights are required

Updating help for some modules will require administrative rights (run as administrator). This applies to modules that are stored in protected areas of the filesystem, such as those in $PSHost (%SystemRoot%System32WindowsPowerShellv1.0) or under program files.

When updating help information from the internet, by default, Update-Help will not download help content more than once every 24 hours. This restriction is documented in the help command and may be seen in action when using the Verbose switch:

PS> Update-Help -Module DnsClient -Verbose
VERBOSE: Help was not updated for the module DnsClient, because the Update-Help command was run on this computer within the last 24 hours.
To update help again, add the Force parameter to your command.

As described in the preceding message, using the Force switch parameter will ignore the time restriction. Importing help from a set of saved files uses the SourcePath parameter:

Update-Help -SourcePath C:	emp 

The following error message may be generated when attempting to import help from another culture:

PS> Update-Help -SourcePath C:Temp -Module DnsClient
Update-Help : Failed to update Help for the module(s) 'DnsClient' with UIculture(s) {en-GB} :
Unable to retrieve the HelpInfo XML file for UI culture en-GB. Make sure the HelpInfoUri property in the module manifest is valid or check your network connection and then try the command again.
At line:1 char:1
+ Update-Help -SourcePath C:Temp -Module DnsClient -Verbose -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Update-Help], Exception
+ FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand

The culture of the computer in question is set to en-GB (Get-UICulture), but the help files are for en-US.

It is possible to work around this problem with the UICulture parameter for Update-Help, as follows:

Update-Help -SourcePath C:Temp -Module DnsClient -UICulture en-US 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.189.7