Tag Archives: MimbolovePowerShell DSC

cPowerShellPackageManagement DSC Resource Updated to Version 1.0.1.0

Written by Tao Yang

Few days ago I found a bug in the cPowerShellPackageManagement DSC resource module that was caused by the previous update v1.0.0.1.

in version 1.0.0.1, I’ve added –AllowClobber switch to the Install-Module cmdlet, which was explained in my previous post: http://blog.tyang.org/2016/12/16/dsc-resource-cpowershellpackagemanagement-module-updated-to-version-1-0-0-1/

However, I only just noticed that despite the fact that the pre-installed version of the PowerShellGet module on Windows Server 2016 and in WMF 5.0 for Windows Server 202 R2, the install-module cmdlet is sightly different. The pre-installed version of PowerShellGet module is 1.0.0.1, and in Windows 10 and Windows Server 2106, Install-Module cmdlet has the “AllowClobber” switch:

image

In Windows Server 2012, the Install-module cmdlet does not have –AllowClobber switch:

image

Therefore I had to update the DSC resource to detect the if AllowClobber switch exists.

Additionally, I have made few additional stability improvements, and added dependency to the PowerShellGet module in the module manifest file.

This updated version can be found on both GitHub and PowerShell Gallery:

Github: https://github.com/tyconsulting/PowerShellPackageManagementDSCResource/releases/tag/1.0.1.0

PowerShell Gallery: https://www.powershellgallery.com/packages/cPowerShellPackageManagement/1.0.1.0