Skip to content

Commit 7ab8d12

Browse files
committed
(#1074) Add docs for Get-ChocolateyConfigValue
1 parent 8e289bd commit 7ab8d12

File tree

3 files changed

+96
-86
lines changed

3 files changed

+96
-86
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
description: Information on Get-ChocolateyConfigValue function
3+
external help file: Chocolatey.PowerShell.dll-Help.xml
4+
Module Name: Chocolatey.PowerShell
5+
online version:
6+
order: 30
7+
schema: 2.0.0
8+
title: Get-ChocolateyConfigValue
9+
xref: get-chocolateyconfigvalue
10+
---
11+
import Xref from '@components/Xref.astro';
12+
13+
# Get-ChocolateyConfigValue
14+
15+
## SYNOPSIS
16+
Retrieves a named configuration value from the Chocolatey Configuration file.
17+
18+
## SYNTAX
19+
20+
```
21+
Get-ChocolateyConfigValue -Name <String> [-IgnoredArguments <Object[]>] [<CommonParameters>]
22+
```
23+
24+
## DESCRIPTION
25+
This cmdlet will retrieve the configuration value specified by the `-Name` parameter from the Chocolatey configuration file.
26+
Sensitive configuration values (for example: `proxyPassword`) will remain in encrypted form when retrieved.
27+
28+
Configuration entries are retrieved by case-insensitive comparison of the name (`key` attribute) in the configuration file.
29+
30+
## EXAMPLES
31+
32+
### Example 1
33+
```powershell
34+
PS C:\> Get-ChocolateyConfigValue -Name cacheLocation
35+
```
36+
37+
Outputs the cacheLocation from the Chocolatey configuration file.
38+
39+
### Example 2
40+
```powershell
41+
PS C:\> Get-ChocolateyConfigValue -ConfigKey cacheLocation
42+
```
43+
44+
Outputs the cacheLocation from the Chocolatey configuration file.
45+
46+
## PARAMETERS
47+
48+
### -IgnoredArguments
49+
Allows splatting with arguments that do not apply. Do not use directly.
50+
51+
```yaml
52+
Type: Object[]
53+
Parameter Sets: (All)
54+
Aliases:
55+
56+
Required: False
57+
Position: Named
58+
Default value: None
59+
Accept pipeline input: False
60+
Accept wildcard characters: False
61+
```
62+
63+
### -Name
64+
The name of the configuration value to retrieve.
65+
66+
```yaml
67+
Type: String
68+
Parameter Sets: (All)
69+
Aliases: ConfigKey
70+
71+
Required: True
72+
Position: Named
73+
Default value: None
74+
Accept pipeline input: False
75+
Accept wildcard characters: False
76+
```
77+
78+
### CommonParameters
79+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
80+
81+
## OUTPUTS
82+
83+
### System.String
84+
85+
Outputs the value of the target configuration file entry as a string.
86+
87+
## NOTES
88+
89+
Available in 2.1.0+
90+
91+
## RELATED LINKS
92+
93+
<Xref title="Cmdlet Reference" value="powershell-cmdlet-reference" />
94+
95+
<Xref title="Function Reference" value="powershell-reference" />

src/content/docs/en-us/create/cmdlets/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Keep in mind Chocolatey's automation scripts are just PowerShell, so you can do
2121
2222
## Complete List (alphabetical order)
2323

24+
* <Xref title="Get-ChocolateyConfigValue" value="get-chocolateyconfigvalue" />
2425
* <Xref title="Get-EnvironmentVariable" value="get-environmentvariable" />
2526
* <Xref title="Get-EnvironmentVariableNames" value="get-environmentvariablenames" />
2627
* <Xref title="Install-ChocolateyPath" value="install-chocolateypath" />
2728
* <Xref title="Set-EnvironmentVariable" value="set-environmentvariable" />
2829
* <Xref title="Test-ProcessAdminRights" value="test-processadminrights" />
2930
* <Xref title="Uninstall-ChocolateyPath" value="uninstall-chocolateypath" />
3031
* <Xref title="Update-SessionEnvironment" value="update-sessionenvironment" />
31-

src/content/docs/en-us/create/functions/get-chocolateyconfigvalue.mdx

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)