-
Notifications
You must be signed in to change notification settings - Fork 15
ChocolateyPackage
dscbot edited this page Apr 19, 2023
·
2 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Ensure | Required | Ensure | ||
Name | Key | String | The name of the ChocolateyPackage to set in the desired state. | |
Version | Write | String | The version of the package to install. If not set, it will only ensure the package is present/absent. If set to latest, it will always make sure the latest version available on the source is the one installed. If set to a version it will try to compare and make sure the installed version is greater or equal than the one desired. | |
ChocolateyOptions | Write | hashtable | Chocolatey parameters as per the Install or Update chocolateyPackage commands. | |
Credential | Write | PSCredential | ||
UpdateOnly | Read | bool | Only update the package if present. When absent do not attempt to install. | |
Reasons | Read | ChocolateyReason[] | Reason for compliance or non-compliance returned by the Get method. |
The ChocolateyPackage DSC Resource helps with chocolatey package management.
This is an unofficial module with DSC resource to Install and configure Chocolatey.
configuration Example
{
Import-DscResource -ModuleName Chocolatey
Node localhost {
ChocolateyPackage Putty {
Ensure = 'Present'
Name = 'Putty'
Version = 'Latest'
ChocolateyOptions = @{
source = 'https://chocolatey.org/api/v2/'
}
}
}
}
This is an unofficial module with DSC resource to Install and configure Chocolatey.
configuration Example
{
Import-DscResource -ModuleName Chocolatey
Node localhost {
ChocolateyPackage Putty {
Ensure = 'Absent'
Name = 'Putty'
}
}
}
This is an unofficial module with DSC resource to Install and configure Chocolatey.
configuration Example
{
Import-DscResource -ModuleName Chocolatey
Node localhost {
ChocolateyPackage Putty {
Ensure = 'Present'
Name = 'Putty'
ChocolateyOptions = @{
source = 'https://chocolatey.org/api/v2/'
}
}
}
}