PowerShell Logo Small

Save-Help



This is the built-in help made by Microsoft for the command 'Save-Help', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Downloads and saves the newest help files to a file system directory.

SYNTAX


Save-Help [-DestinationPath] <String[]> [[-Module] [<PSModuleInfo[]>]] [[-UICulture] [<CultureInfo[]>]] [-Credential [<PSCredential>]] [-Force] [-FullyQualifiedModule
[<ModuleSpecification[]>]] [-UseDefaultCredentials] [<CommonParameters>]
Save-Help [[-Module] [<PSModuleInfo[]>]] [[-UICulture] [<CultureInfo[]>]] [-Credential [<PSCredential>]] [-Force] [-FullyQualifiedModule [<ModuleSpecification[]>]]
[-UseDefaultCredentials] -LiteralPath <String[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Save-Help cmdlet downloads the newest help files for Windows PowerShell modules and saves them to a directory that you specify. This feature lets you update the help
files on computers that do not have access to the Internet, and makes it easier to update the help files on multiple computers.


In Windows PowerShell 3.0, Save-Help worked only for modules that are installed on the local computer. Although it was possible to import a module from a remote computer, or
obtain a reference to a PSModuleInfo object from a remote computer by using Windows PowerShell remoting, the HelpInfoUri property was not preserved, and Save-Help would not
work for remote module Help.


In Windows PowerShell 4.0, the HelpInfoUri property is preserved over Windows PowerShell remoting, which allows Save-Help to work for modules that are installed on remote
computers. It is also possible to save a PSModuleInfo object to disk or removable media by running Export-CliXml on a computer that does not have Internet access, import the
object on a computer that does have Internet access, and then run Save-Help on the PSModuleInfo object. The saved help can be transported to the remote computer by using
removable storage media (such as a USB drive), and then the help can be installed on the remote computer by running Update-Help. This process can be used to install help on
computers that do not have any kind of network access.


To install saved help files, run the Update-Help cmdlet. Add its SourcePath parameter to specify the directory in which you saved the Help files.


Without parameters, a Save-Help command downloads the newest help for all modules in the session and for modules that are installed on the computer in a location listed in
the PSModulePath environment variable. Modules that do not support Updatable Help are skipped without warning.


The Save-Help cmdlet checks the version of any help files in the destination directory and, if newer help files are available, it downloads the newest help files from the
Internet and saves them in the directory. The Save-Help cmdlet works just like the Update-Help cmdlet, except that it saves the downloaded cabinet (.cab) files in a
directory, instead of extracting the help files from the cabinet files and installing them on the computer.


The saved help for each module consists of one help information (HelpInfo XML) file and one cabinet (.cab) file for the help files each UI culture. You do not need to
extract the help files from the cabinet file. The Update-Help cmdlet extracts the help files, validates the XML for safety, and then installs the help files and the help
information file in a language-specific subdirectory of the module directory.


To save the help files for modules in the Windows PowerShell installation directory ($pshome\Modules), start Windows PowerShell with the "Run as administrator" option. You
must be a member of the Administrators group on the computer to download the help files for these modules.


This cmdlet is introduced in Windows PowerShell 3.0.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=289611
Updatable Help Status Table (http://go.microsoft.com/fwlink/?LinkID=270007)
Get-Culture
Get-Help
Get-Module
Get-UICulture
Update-Help

REMARKS

<

Examples


Example 1: Save the help for the DhcpServer module

PS C:\># Option 1: Run Invoke-Command to get the PSModuleInfo object for the remote DHCP Server module, save the PSModuleInfo object in the variable $m, and then run
Save-Help.

$m = Invoke-Command -ComputerName RemoteServer -ScriptBlock { Get-Module -Name DhcpServer -ListAvailable }
Save-Help -Module $m -DestinationPath C:\SavedHelp


# Option 2: Open a PSSession--targeted at the remote computer that is running the DhcpServer module--to get the PSModuleInfo object for the remote module, and then run
Save-Help.

$s = New-PSSession -ComputerName RemoteServer
$m = Get-Module -PSSession $s -Name DhcpServer -ListAvailable
Save-Help -Module $m -DestinationPath C:\SavedHelp


# Option 3: Open a CIM session--targeted at the remote computer that is running the DhcpServer module--to get the PSModuleInfo object for the remote module, and then run
Save-Help.

$c = New-CimSession -ComputerName RemoteServer
$m = Get-Module -CimSession $c -Name DhcpServer -ListAvailable
Save-Help -Module $m -DestinationPath C:\SavedHelp



This example shows three different ways to use Save-Help to save the help for the DhcpServer module from an Internet-connected client computer, without installing the
DhcpServer module or the DHCP Server role on the local computer.






Example 2: Install help for the DhcpServer module

PS C:\># First, run Export-CliXml to export the PSModuleInfo object to a shared folder or to removable media.

$m = Get-Module -Name DhcpServer –ListAvailable
Export-CliXml –Path E:\UsbFlashDrive\DhcpModule.xml –InputObject $m

# Next, transport the removable media to a computer that has Internet access, and then import the PSModuleInfo object with Import-CliXml. Run Save-Help to save the Help for
the imported DhcpServer module PSModuleInfo object.

$deserialized_m = Import-CliXml E:\UsbFlashDrive\DhcpModule.xml
Save-Help -Module $deserialized_m -DestinationPath E:\UsbFlashDrive\SavedHelp

# Finally, transport the removable media back to the computer that does not have network access, and then install the help by running Update-Help.
Update-Help –Module DhcpServer –SourcePath E:\UsbFlashDrive\SavedHelp



This example shows how to install help that you saved in Example 1 for the DhcpServer module on a computer that does not have Internet access.






Example 3: Save help for all modules

PS C:\>Save-Help –DestinationPath \\Server01\FileShare01



This command downloads the newest help files for all modules in the UI culture set for Windows on the local computer. It saves the help files in the \\Server01\Fileshare01
directory.






Example 4: Save help for a module on the computer

PS C:\>Save-Help –Module ServerManager -DestinationPath \\Server01\FileShare01 -Credential Domain01/Admin01



This command downloads the newest help files for the ServerManager module and saves them in the \\Server01\Fileshare01 directory.

When a module is installed on the computer, you can type the module name as the value of the Module parameter, even if the module is not imported into the current session.

The command uses the Credential parameter to supply the credentials of a user who has permission to write to the file share.






Example 5: Save help for a module on a different computer

PS C:\>Invoke-Command –ComputerName Server02 {Get-Module –Name CustomSQL –ListAvailable} | Save-Help -DestinationPath \\Server01\FileShare01 -Credential Domain01\Admin01



These commands download the newest help files for the CustomSQL module and save them in the \\Server01\Fileshare01 directory.

Because the CustomSQL module is not installed on the computer, the sequence includes an Invoke-Command command that gets the module object for the CustomSQL module from the
Server02 computer and then pipes the module object to the Save-Help cmdlet.

When a module is not installed on the computer, Save-Help needs the module object, which includes information about the location of the newest help files.






Example 6: Save help for a module in multiple languages

PS C:\>Save-Help –Module Microsoft.PowerShell* -UICulture de-DE, en-US, fr-FR, ja-JP -DestinationPath D:\Help



This command saves help for the Windows PowerShell Core modules in four different UI cultures. The language packs for these locales do not need to be installed on the
computer.

Save-Help can download help files for modules in different UI cultures only when the module owner makes the translated files available on the Internet.






Example 7: Save help more than once each day

PS C:\>Save-Help –Force –DestinationPath \\Server3\AdminShare\Help



This command saves help for all modules that are installed on the computer. The command uses It uses the Force parameter to override the rule that prevents the Save-Help
cmdlet from downloading help more than once in each 24-hour period.

The Force parameter also overrides the 1 GB restriction and circumvents version checking, so you can download files even if the version is not greater than the version in
the destination directory.

The command uses the Save-Help cmdlet to download and save the help files to the specified directory. The Force parameter is required when you need to run a Save-Help
command more than once each day.