|
1 |
| -[CmdletBinding()] |
| 1 | +<# |
| 2 | + .SYNOPSIS |
| 3 | + Deploys Chocolatey onto an endpoint. |
| 4 | +
|
| 5 | + .EXAMPLE |
| 6 | +
|
| 7 | + Some endpoints may require a different set of features. The default installation will apply our _recommended_ configuration. |
| 8 | + However, you can override these defaults or enable/disable additional features by providing the `-AdditionalFeatures` parameter. |
| 9 | +
|
| 10 | + In this example we will disable the use of the background service so non-admin users cannot use Chocolatey (not recommended), and enable Gloabl Confirmation so you no longer need to pass -y when performing a package operation. |
| 11 | + |
| 12 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalFeatures @{ useBackgroundService = 'Disabled'; allowGlobalCOnfirmation = 'Enabled' } |
| 13 | + |
| 14 | + .EXAMPLE |
| 15 | + You can apply custom configuration which overrides the defaults or provides additional configuration by providing the `-AdditionalConfiguration` parameter. |
| 16 | + The following example sets the `centralManagementReportPackagesTimerIntervalInSeconds` configuration item to 21600 seconds (6 hours). |
| 17 | +
|
| 18 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalConfiguration @{ 'centralManagementReportPackagesTimerIntervalInSeconds' = '21600'} |
| 19 | +
|
| 20 | + .EXAMPLE |
| 21 | + You can include additional Chocolatey sources during the installation process by providing the `-AdditionalSources` parameter. |
| 22 | +
|
| 23 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalSources @{Name = 'ChocolateyUpstream'; Source = 'https://community.chocolatey.org/api/v2/'} |
| 24 | +
|
| 25 | + .EXAMPLE |
| 26 | + This example include Packaging Tools and sets up a local folder source for package development testing. |
| 27 | + The local folder must exist prior to using this source. |
| 28 | +
|
| 29 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalSources @{Name = 'LocalTest'; Source = 'C:\packages\testing'} |
| 30 | +
|
| 31 | +
|
| 32 | + .EXAMPLE |
| 33 | + The following example installs the notepadplusplus.install package. |
| 34 | +
|
| 35 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalPackages @{Id ='notepadplusplus.install'} |
| 36 | +
|
| 37 | + .EXAMPLE |
| 38 | + The following example installs version 8.7.5 of the notepadplusplus.install package. |
| 39 | + |
| 40 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalPackages @{Id ='notepadplusplus.install'; Version = '8.7.5'} |
| 41 | + |
| 42 | + .EXAMPLE |
| 43 | + The following example installs version 8.7.5 of the notepadplusplus.install package and pins it so that it is not upgraded when using `choco upgrade` |
| 44 | + To upgrade this package, you will need to first unpin it, and then perform the upgrade. |
| 45 | + |
| 46 | + . .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalPackages @{Id ='notepadplusplus.install'; Version = '8.7.5'; Pin = $true} |
| 47 | + |
| 48 | + .NOTES |
| 49 | +
|
| 50 | + Full documentation is available at https://docs.chocolatey.org/en-us/c4b-environments/quick-start-environment/advanced-client-configuration/ |
| 51 | + #> |
| 52 | +[CmdletBinding(HelpUri = 'https://docs.chocolatey.org/en-us/c4b-environments/quick-start-environment/advanced-client-configuration/')] |
2 | 53 | Param(
|
3 | 54 | # The DNS name of the server that hosts your repository, Jenkins, and Chocolatey Central Management
|
4 | 55 | [Parameter()]
|
|
0 commit comments