Skip to content

Commit 2b34bb6

Browse files
committed
(#240) Add comment based help to register script
This commit adds help to the register script to document all the new paramters and examples of their use.
1 parent fc5bfd4 commit 2b34bb6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

scripts/Register-C4bEndpoint.ps1

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
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+
#>
133
[CmdletBinding()]
234
Param(
335
# The DNS name of the server that hosts your repository, Jenkins, and Chocolatey Central Management

0 commit comments

Comments
 (0)