DscResources
DscResources copied to clipboard
Support -AllowClobber
Original PS cmdlets have the -AllowClobber switch. Can this be ported to this DSC resource.
A command with name 'Add-RoleMember' is already available on this system. This module 'SqlServer' may override the existing commands. If you still want to install this module 'SqlServer', use -AllowClobber parameter.
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:) [], CimException
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
+ PSComputerName : localhost
VERBOSE: [AUCADN102002052]: LCM: [ End Set ] [[PSModuleResource]SqlServerPSModule] in 39.9870 seconds.
The PowerShell DSC resource '[PSModuleResource]SqlServerPSModule' with SourceInfo 'C:\Temp\InstallSqlServerPSModule.ps1::5::5::PSModuleResource' threw one or more non-terminating errors while running the Set functionality.
These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost
VERBOSE: [AUCADN102002052]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 53.022 seconds
Small point, shouldn't this resource be called cPowerShellModule, where 'c' stands for community as it is in the public domain?
BTW. Thanks for publishing this.
Thanks for your feedback.
AllowClobber
would be a great addition. I won't be able to add this in the very near future though (upcoming conferences).
If you like, please open a Pull Request and I'm happy to merge it in.
To your naming comment: No, I don't agree with that practice. I agree that the name isn't perfect, but the c
Prefix, just like the x
, has always been a bad idea.
Hello, I submitted a pull request for this issue. Can you please review?
Thanks.
Is this now released somewhere?
When will this be push to the powershell gallery?
Will this be pushed to PowerShell Gallery?
This is the only DSC resource I have found to import modules with AllowClobber.
@davidobrien1985 would you publish the latest module version to psgallery please ? :)
@davidobrien1985 would you publish the latest module version to psgallery please ? :)