Skip to content

Commit

Permalink
(#240) Add comment based help to register script
Browse files Browse the repository at this point in the history
This commit adds help to the register script to document all the new
paramters and examples of their use.
  • Loading branch information
steviecoaster committed Jan 9, 2025
1 parent fc5bfd4 commit 877ac1c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions scripts/Register-C4bEndpoint.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
<#
.SYNOPSIS
Deploys Chocolatey onto an endpoint.
.EXAMPLE
Some endpoints may require a different set of features. The default installation will apply our _recommended_ configuration.
However, you can override these defaults or enable/disable additional features by providing the `-AdditionalFeatures` parameter.
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.
. .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalFeatures @{ useBackgroundService = 'Disabled'; allowGlobalCOnfirmation = 'Enabled' }
.EXAMPLE
You can apply custom configuration which overrides the defaults or provides additional configuration by providing the `-AdditionalConfiguration` parameter.
The following example sets the `centralManagementReportPackagesTimerIntervalInSeconds` configuration item to 21600 seconds (6 hours).
. .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalConfiguration @{ 'centralManagementReportPackagesTimerIntervalInSeconds' = '21600'}
.EXAMPLE
You can include additional Chocolatey sources during the installation process by providing the `-AdditionalSources` parameter.
. .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalSources @{Name = 'ChocolateyUpstream'; Source = 'https://community.chocolatey.org/api/v2/'}
.EXAMPLE
This example include Packaging Tools and sets up a local folder source for package development testing.
The local folder must exist prior to using this source.
. .\Register-C4bEndpoint.ps1 -RepositoryCredential (Get-Credential) -AdditionalSources @{Name = 'LocalTest'; Source = 'C:\packages\testing'}
#>
[CmdletBinding()]
Param(
# The DNS name of the server that hosts your repository, Jenkins, and Chocolatey Central Management
Expand Down

0 comments on commit 877ac1c

Please sign in to comment.