Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support -AllowClobber #11

Open
arcotek-ltd opened this issue Oct 5, 2017 · 7 comments
Open

Support -AllowClobber #11

arcotek-ltd opened this issue Oct 5, 2017 · 7 comments

Comments

@arcotek-ltd
Copy link

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.

@davidobrien1985
Copy link
Owner

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.

@drryu
Copy link
Contributor

drryu commented Jan 9, 2018

Hello, I submitted a pull request for this issue. Can you please review?

Thanks.

@dazinator
Copy link

Is this now released somewhere?

@ricohomewood
Copy link

When will this be push to the powershell gallery?

@mjcarrabine
Copy link

Will this be pushed to PowerShell Gallery?

This is the only DSC resource I have found to import modules with AllowClobber.

@jbpaux
Copy link

jbpaux commented Mar 31, 2021

@davidobrien1985 would you publish the latest module version to psgallery please ? :)

1 similar comment
@robwafle
Copy link

robwafle commented Jun 9, 2021

@davidobrien1985 would you publish the latest module version to psgallery please ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants