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

Resource should allow ArgumentList parameter for modules that require addtl flags #18

Open
ArtisanByteCrafter opened this issue May 30, 2019 · 1 comment

Comments

@ArtisanByteCrafter
Copy link

ArtisanByteCrafter commented May 30, 2019

Example:
Some modules require additional parameters for successful unattended installation.
Install-Module UniversalDashboard -AcceptLicense

When run from DSC, the following error is produced:

License Acceptance is required for module 'UniversalDashboard'. Please specify '-AcceptLicense' to perform this operation.
    + CategoryInfo          : InvalidArgument: (Microsoft.Power....InstallPackage:) [], CimException
    + FullyQualifiedErrorId : ForceAcceptLicense,Install-PackageUtility,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
    + PSComputerName        : computername

Something like this would be nice:

PSModuleResource UniversalDashboard {
    Ensure          = 'Present'
    Module_Name     = 'UniversalDashboard'
    RequiredVersion = '2.3.2'
    ArgumentList    = "-AcceptLicense"
}
@mwhisler
Copy link

Agreed. Here's another example of trying to apply Az.ApplicationMonitor to a virtual machine for autoinstrumentation. I need to do this with DSC, but need to pass an additional flag for accepting the license. https://learn.microsoft.com/en-us/azure/azure-monitor/app/application-insights-asp-net-agent?tabs=getting-started

Otherwise, you'll see these errors in the DSC logs:
{"time": "2023-05-12T10:03:54.990-5:00", "type": "error", "message": "License Acceptance is required for module 'Az.ApplicationMonitor'. Please specify '-AcceptLicense' to perform this operation."},

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

2 participants