-
Notifications
You must be signed in to change notification settings - Fork 15
ChocolateySource
dscbot edited this page Oct 23, 2025
·
3 revisions
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | System.String | Name - the name of the source. Required with some actions. Defaults to empty. | |
| ByPassProxy | Write | System.Boolean | Bypass Proxy - Should this source explicitly bypass any explicitly or system configured proxies? Defaults to false. Available in 0.10.4+. | |
| Credential | Write | System.Management.Automation.PSCredential | Credential used with authenticated feeds. Defaults to empty. | |
| Disabled | Write | System.Boolean | Allow the source to be registered but disabled. | |
| Ensure | Write | Ensure | Indicate whether the Chocolatey source should be installed or removed from the system. |
Absent, Present
|
| Password | Write | System.String | ||
| Priority | Write | System.Int32 | Priority - The priority order of this source as compared to other sources, lower is better. Defaults to 0 (no priority). All priorities above 0 will be evaluated first, then zero-based values will be evaluated in config file order. Available in 0.9.9.9+. | |
| SelfService | Write | System.Boolean | Allow Self-Service - Should this source be allowed to be used with self- service? Requires business edition (v1.10.0+) with feature 'useBackgroundServiceWithSelfServiceSourcesOnly' turned on. Defaults to false. Available in 0.10.4+. | |
| Source | Write | System.String | Source - The source. This can be a folder/file share or an http location. If it is a url, it will be a location you can go to in a browser and it returns OData with something that says Packages in the browser, similar to what you see when you go to https://chocolatey.org/api/v2/. Defaults to empty. | |
| Username | Write | System.String | ||
| Reasons | Read | ChocolateyReason[] |
Chocolatey will allow you to interact with sources. You can register a new source, whether internal or external with some source specific settings such as proxy.
This is an unofficial module with DSC resource to Install and configure Chocolatey.
configuration Example
{
Import-DscResource -ModuleName Chocolatey
Node localhost {
ChocolateySource ChocolateyOrg {
Ensure = 'Present'
Name = 'Chocolatey'
Source = 'https://chocolatey.org/api/v2'
Priority = 0
Disabled = $false
}
}
}This is an unofficial module with DSC resource to Install and configure Chocolatey.
configuration Example
{
Import-DscResource -ModuleName Chocolatey
Node localhost {
ChocolateySource ChocolateyOrg {
Ensure = 'Absent'
Name = 'Chocolatey'
}
}
}- Add-ChocolateyPin
- Compare-ChocolateyPackage
- Disable-ChocolateyFeature
- Disable-ChocolateySource
- Enable-ChocolateyFeature
- Enable-ChocolateySource
- Find-ChocolateyPackage
- Get-ChocolateyCommand
- Get-ChocolateyFeature
- Get-ChocolateyPackage
- Get-ChocolateyPin
- Get-ChocolateySetting
- Get-ChocolateySource
- Get-ChocolateyVersion
- Install-ChocolateyPackage
- Install-ChocolateySoftware
- Register-ChocolateySource
- Remove-ChocolateyPin
- Set-ChocolateySetting
- Test-ChocolateyFeature
- Test-ChocolateyInstall
- Test-ChocolateyPin
- Test-ChocolateySetting
- Test-ChocolateySource
- Uninstall-Chocolatey
- Uninstall-ChocolateyPackage
- Unregister-ChocolateySource
- Update-ChocolateyPackage