Use this module to initialize a directory as a container for SoftPaqs, pull the latest SoftPaqs for a platform or set of platforms, apply filters for the types of SoftPaqs to pull, etc.
This module contains the following commands:
Initializing the repository
A directory must be initialized as a repository. This command 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 | Initializes a repository in the current directory |
Configuring the repository
The following commands allow users to get and set various repository properties like error handling.
Function | Description |
---|---|
Get-RepositoryConfiguration | Retrieves the configuration values for a specified setting in the current repository |
Set-RepositoryConfiguration | Sets repository configuration values |
Adding and removing platforms
These commands allow for adding and removing platforms as well as any associated filters from the current repository. Use these commands to control what SoftPaqs the current repository will receive.
Function | Description |
---|---|
Add-RepositoryFilter | Adds a filter per specified platform to the current repository |
Remove-RepositoryFilter | Removes one or more previously added filters per specified platform from the current repository |
Getting repository information
These commands get information about a repository. You can also see similar data by reading the .repository\repository.json file.
Function | Description |
---|---|
Get-RepositoryInfo | Retrieves the current repository definition |
New-RepositoryReport | Creates a report from a repository directory |
Synchronizing a repository
This command synchronizes a repository based on the currently defined rules.
Function | Description |
---|---|
Invoke-RepositorySync | Synchronizes the current repository and generates a report that includes information about the repository |
Removing orphaned SoftPaqs
This command cleans up unneeded SoftPaqs. It would normally be performed after a successful sync.
Function | Description |
---|---|
Invoke-RepositoryCleanup | Removes obsolete SoftPaqs from the current repository |
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 commands to configure an SMTP server and define a list of recipients to receive the failure emails.
Function | Description |
---|---|
Get-RepositoryNotificationConfiguration | Retrieves the current notification configuration |
Set-RepositoryNotificationConfiguration | Sets the repository notification configuration in the current repository |
Clear-RepositoryNotificationConfiguration | Clears the repository notification configuration from the current repository |
Show-RepositoryNotificationConfiguration | Displays the current notification configuration onto the screen |
Add-RepositorySyncFailureRecipient | Adds a recipient to the list of recipients to receive failure notification emails for the current repository |
Remove-RepositorySyncFailureRecipient | Removes a recipient from the list of recipients that receive failure notification emails for the current repository |
Test-RepositoryNotificationConfiguration | Tests the email notification configuration by sending a test email |
All commands above must be executed in a repository directory, and all configuration is executed per repository. To maintain multiple repositories, create repositories in separate 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.