Set-HPRepositoryConfiguration



Summary

Sets repository configuration values

Syntax

Set-HPRepositoryConfiguration [-Setting] <String> [-Format] <String> [<CommonParameters>]

Set-HPRepositoryConfiguration [-Setting] <String> [-CacheValue] <String> [<CommonParameters>]

Set-HPRepositoryConfiguration [-Setting] <String> [-Value] <String> [<CommonParameters>]

Set-HPRepositoryConfiguration [-Setting] <String> [-LogValue] <String> [<CommonParameters>]

Description

This command is used to configure different settings of the repository synchronization:

  • OnRemoteFileNotFound: Indicates the behavior for when the SoftPaq is not found on the remote site. 'Fail' stops the execution. 'LogAndContinue' logs the errors and continues the execution.
  • RepositoryReport: Indicates the format of the report generated at repository synchronization. The default format is 'CSV' and other options available are 'JSON,' 'XML,' and 'ExcelCSV.'
  • OfflineCacheMode: Indicates that all repository files are required for offline use. Repository synchronization will include platform list, advisory, and knowledge base files. The default value is 'Disable' and the other option is 'Enable.'
  • LogPath: Specifies the path for the repository activity log file. The default value is '.repository/activity.log'. If the path is changed, the existing log file will be moved to the new location. The directory must already exist. If a directory path is provided (with or without a trailing backslash), the current log file name from the repository settings is automatically appended.

Parameters

Name Argument Description
Setting <String> Specifies the setting to configure. The value must be one of the following values: 'OnRemoteFileNotFound', 'OfflineCacheMode', or 'RepositoryReport'.
Value <ErrorHandling> Specifies the new value for the OnRemoteFileNotFound setting. The value must be either: 'Fail' (default), or 'LogAndContinue'.
CacheValue <String> Specifies the new value for the OfflineCacheMode setting. The value must be either: 'Disable' (default), or 'Enable'.
Format <String> Specifies the new value for the RepositoryReport setting. The value must be one of the following: 'CSV' (default), 'JSon', 'XML', or 'ExcelCSV'.
LogValue <String> Specifies the new path for the repository activity log file. The directory component of the path must already exist; this command will not create it. If a log file already exists at the current path, it will be moved to the new location. If a directory path is provided instead of a full file path, the current log file name is automatically appended (e.g., 'C:\Logs' becomes 'C:\Logs\activity.log').

Notes

  • When using HP Image Assistant and offline mode, use: Set-HPRepositoryConfiguration -Setting OfflineCacheMode -CacheValue Enable
  • More information on using HPIA with CMSL can be found at this blog post.
  • To create a report outside the repository, use the New-HPRepositoryReport command.

Examples


PS C:\> Set-HPRepositoryConfiguration -Setting OnRemoteFileNotFound -Value LogAndContinue

PS C:\> Set-HPRepositoryConfiguration -Setting OfflineCacheMode -CacheValue Enable

PS C:\> Set-HPRepositoryConfiguration -Setting RepositoryReport -Format CSV

PS C:\> Set-HPRepositoryConfiguration -Setting LogPath -LogValue "C:\Logs\repo-activity.log"

See also