Softpaq Repository

Use this module to initialize a directory as a container for softpaqs, which can then be kept up to date with the latest softpaqs for a platform or set of platforms.

The module contains the following methods:


Initializing the repository

A directory must be initialized as a repository. This process creates the proper files in the directory that store the repository settings. To undo the initialization or initialize from scratch, simply remove the .repository folder from the directory.

Function     Description
Initialize-Repository    Initialize a directory as a repository


Configuring the repository

The following cmdlets configure various repository properties, such as erorr handlers.

Function    Description
Get-RepositoryConfiguration   Get configuration settings for the current repository
Set-RepositoryConfiguration   Configure repository settings


Adding and removing platforms

These functions add or remove platforms from the repository, including any associated filters. Use these to control what softpaqs the repository will receive.

Function    Description
Add-RepositoryFilter    Add a platform filter to the current repository
Remove-RepositoryFilter    Remove a previously added filter from the current repository


Getting repository information

This function gets an object with the current repository definition. You can also see similar data by reading the .repository\repository.json file.

Function    Description
Get-RepositoryInfo    Get an object containing the current repository definition


Synchronizing a repository

This function synchronizes a repository based on the currently defined rules.

Function    Description
Invoke-RepositorySync    Synchronize a directory by downloading softpaqs

Removing orphaned softpaqs

This function cleans up unneeded softpaqs. It would normally be performed after a successful sync.

Function    Description
Invoke-RepositoryCleanup   Delete softpaqs that are no longer needed

Configuring email failure notifications

When synchronizing a softpaq repository on a schedule, it may be desirable to be notified by email if the process fails. Use these methods to configure an SMTP server and define a list of recipients to receive the failure emails.

Function    Description
Set-RepositoryNotificationConfiguration    Configure a SMTP server for failure notifications
Clear-RepositoryNotificationConfiguration   Remove SMTP server information from current repository
Show-RepositoryNotificationConfiguration    View current SMTP server configuration
Add-RepositorySyncFailureRecipient    Add a recipient to the list of recipients to receive failure notification emails
Remove-RepositorySyncFailureRecipient    Remove a recipient from the list of recipients that receive failure notification emails
Test-RepositoryNotificationConfiguration    Send a failure notification to test SMTP server configuration and recipients list

All methods above must be executed in the repository directory, and all configuration is per repository. To maintain multiple repositories, simply create additional directories, initialize them, and configure them separately.


Files

When initialized, a directory named ".repository" is created in the repository directory. This directory contains a configuration file (.repository/repository.json) which contains all the configuration for this repository, and a log file (.repository/activity.log) which registers significant actions. Additional files and directories may exist which are used internally by the synchronization process.

The log file may be deleted when no longer needed.