This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
PSRepository: New DSC resource #417
Closed
Description
I suggest we add a new DSC resource PSRepository
to this module. Initially the new resource should be able to register a new PowerShell repository (Register-PSRepository
), remove a registered repository (Unregister-PSRepository
) and change properties of a an already registered repository (Set-PSRepository
).
The permission to add, remove or change the repository is controlled by the built-in PsDscRunAsCredential
property.
I suggest the following schema for the new resource.
[ClassVersion("1.0.0.0"), FriendlyName("PSRepository")]
class MSFT_PSRepository : OMI_BaseResource
{
[Key, Description("The name of the repository to manage.")] String Name;
[Write, Description("If the repository should be present or absent on the server being configured."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Specifies the URI for discovering and installing modules from this repository. A URI can be a NuGet server feed, HTTP, HTTPS, FTP or file location.")] String SourceLocation;
[Write, Description("Specifies the URI for the script source location.")] String ScriptSourceLocation;
[Write, Description("Specifies the URI of the publish location. For example, for NuGet-based repositories, the publish location is similar to http://someNuGetUrl.com/api/v2/Packages.")] String PublishLocation;
[Write, Description("Specifies the URI for the script publish location.")] String ScriptPublishLocation;
[Write, Description("Specifies the installation policy. Valid values are: Trusted, UnTrusted. The default value is UnTrusted.", ValueMap{"Trusted", "Untrusted"},Values{"Trusted", "Untrusted"}] String InstallationPolicy;
[Write, Description("Specifies a OneGet package provider. Default value is 'NuGet'.")] String PackageManagementProvider;
I can put in the work for this resource if the community/team is interested by this addition.