From 62dd3b1dc44f5ee5d53b3e6ae05d9ca280ac55ea Mon Sep 17 00:00:00 2001 From: Scott Matthews Date: Fri, 9 Feb 2018 21:01:25 +0000 Subject: [PATCH] adding support for switches: Force,AllowClobber,SkipPublisherCheck --- .../MSFT_PackageManagement.psm1 | 69 ++++++++++++++++++ .../MSFT_PackageManagement.schema.mof | Bin 1080 -> 1276 bytes 2 files changed, 69 insertions(+) diff --git a/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.psm1 b/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.psm1 index f7eb01daa..95ff97fa5 100644 --- a/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.psm1 +++ b/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.psm1 @@ -54,6 +54,17 @@ function Get-TargetResource Specifies a package provider name to which to scope your package search. You can get package provider names by running the Get-PackageProvider cmdlet. + .PARAMETER Force + Forces the installation of modules. If a module of the same name and version already exists on the computer, + this parameter overwrites the existing module with one of the same name that was found by the command. + + .PARAMETER AllowClobber + Allows the installation of modules regardless of if other existing module on the computer have cmdlets + of the same name + + .PARAMETER SkipPublisherCheck + Allows the installation of modules that have not been catalog signed + .PARAMETER AdditionalParameters Provider specific parameters that are passed as an Hashtable. For example, for NuGet provider you can pass additional parameters like DestinationPath. @@ -89,6 +100,18 @@ function Get-TargetResource [Parameter()] [System.String] $ProviderName, + + [Parameter()] + [Switch] + $Force, + + [Parameter()] + [Switch] + $AllowClobber, + + [Parameter()] + [Switch] + $SkipPublisherCheck, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]]$AdditionalParameters @@ -198,6 +221,17 @@ function Test-TargetResource Specifies a package provider name to which to scope your package search. You can get package provider names by running the Get-PackageProvider cmdlet. + .PARAMETER Force + Forces the installation of modules. If a module of the same name and version already exists on the computer, + this parameter overwrites the existing module with one of the same name that was found by the command. + + .PARAMETER AllowClobber + Allows the installation of modules regardless of if other existing module on the computer have cmdlets + of the same name + + .PARAMETER SkipPublisherCheck + Allows the installation of modules that have not been catalog signed + .PARAMETER AdditionalParameters Provider specific parameters that are passed as an Hashtable. For example, for NuGet provider you can pass additional parameters like DestinationPath. @@ -237,6 +271,18 @@ function Test-TargetResource [Parameter()] [System.String] $ProviderName, + + [Parameter()] + [Switch] + $Force, + + [Parameter()] + [Switch] + $AllowClobber, + + [Parameter()] + [Switch] + $SkipPublisherCheck, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]]$AdditionalParameters @@ -298,6 +344,17 @@ function Set-TargetResource Specifies a package provider name to which to scope your package search. You can get package provider names by running the Get-PackageProvider cmdlet. + .PARAMETER Force + Forces the installation of modules. If a module of the same name and version already exists on the computer, + this parameter overwrites the existing module with one of the same name that was found by the command. + + .PARAMETER AllowClobber + Allows the installation of modules regardless of if other existing module on the computer have cmdlets + of the same name + + .PARAMETER SkipPublisherCheck + Allows the installation of modules that have not been catalog signed + .PARAMETER AdditionalParameters Provider specific parameters that are passed as an Hashtable. For example, for NuGet provider you can pass additional parameters like DestinationPath. @@ -336,6 +393,18 @@ function Set-TargetResource [Parameter()] [System.String] $ProviderName, + + [Parameter()] + [Switch] + $Force, + + [Parameter()] + [Switch] + $AllowClobber, + + [Parameter()] + [Switch] + $SkipPublisherCheck, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]]$AdditionalParameters diff --git a/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.schema.mof b/src/Microsoft.PackageManagement.DscResources/MSFT_PackageManagement/MSFT_PackageManagement.schema.mof index ff1461b18a67785f7e4c1b53e47d6732f656eefb..939193996e70f6aff49497976a6aee6a3ba3bb0e 100644 GIT binary patch delta 142 zcmdnN@rQH652nc*7+EBp81jKIhar_Aks*&kfx!*PD`H4yNS(ZpNm?CU))A;O2dJW) z!5K^^F(d(X7J<|nqpJ;O$Y#i7C}0R+CtDL-yu}OyP_GU$-D7 delta 12 Tcmeyvxr1ZF52np~m>n1aCj