Set-RepositoryConfiguration



Summary

Set repository configuration values

Syntax

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

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

Set-RepositoryConfiguration [-Setting] <String> [-Value] {Fail | LogAndContinue} [<CommonParameters>]

Description

This function sets various configuration options that control synchronization behavior.

Parameters

Name Argument Description
Setting <String> The setting to configure from 'OnRemoteFileNotFound', 'OfflineCacheMode' and 'RepositoryReport'.
Value <ErrorHandling> The new value of the setting for OnRemoteFileNotFound. It can be from 'Fail' (default) and 'LogAndContinue'.
CacheValue <String> The new CacheValue of the setting for OfflineCacheMode. It can be from 'Disable' (default) and 'Enable'.
Format <String> The new value of the setting for RepositoryReport. It can be from 'CSV' (Default) ,'JSon', 'XML' and 'ExcelCSV'.

Notes

Current event handlers supported:

  • OnRemoteFileNotFound - indicates what should happen if an expected SoftPaq is not found on the remote site. The default is 'Fail' in which case the process will stop. Setting to 'LogAndContinue' will log the error, but the repository synchronization will continue.

Current Repository Report functionality:

Invoke-RepositorySync will create a report containing contents of the Repository in a format provided by RepositoryFormat Setting. Use RepositoryReport Setting with -Format to set the format in which the you would like the report to be generated. Default format is CSV. Report will be generated with a name Contents. e.g. Contents.CSV inside the .repository directory

To create a report outside the repository use New-RepositoryReport function.

Examples


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

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

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

See also