Skip to content

Commit

Permalink
PowerShell Help for Microsoft.WinGet.Client (#4674)
Browse files Browse the repository at this point in the history
  • Loading branch information
denelon authored Aug 13, 2024
1 parent d5a5dce commit 5427597
Show file tree
Hide file tree
Showing 24 changed files with 3,847 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
^src/cpprestsdk/
^src/JsonCppLib/
^src/PowerShell/ExternalModules/PowerShellGet/2\.2\.5/Modules/
^src/PowerShell/Help/markdownlint.yaml$
^src/PureLib/
^src/SfsClient/
^src/UndockedRegFreeWinRT/
Expand Down
17 changes: 2 additions & 15 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ASequence
ashpatil
Ashwini
ASwitch
Asn
ASYNCRTIMP
Atest
ATL
Expand Down Expand Up @@ -85,7 +86,6 @@ CLASSNOTREG
CLOSEAPP
cloudapp
clsctx
clsid
CMSG
cobertura
CODEOWNERS
Expand Down Expand Up @@ -139,7 +139,6 @@ ecfr
ecfrbrowse
EFGH
efileresource
endregion
ENDSESSION
EQU
ERANGE
Expand All @@ -148,7 +147,6 @@ errmsg
ERRORONEXIT
errstr
ESRB
ests
etest
etl
execustom
Expand Down Expand Up @@ -256,7 +254,6 @@ ldcase
learnxinyminutes
lhs
LIBYAML
Linq
liv
liwpx
localizationpriority
Expand Down Expand Up @@ -328,12 +325,11 @@ myinstalldir
mylog
mysilent
mysilentwithprogress
nameof
mysource
Nami
nativehandle
NBLGGH
NESTEDINSTALLER
netfx
netlify
NETSDK
Newtonsoft
Expand All @@ -355,7 +351,6 @@ NOSEARCH
NOSEPARATOR
notalostreference
NOTAPROPERTY
notmatch
NOTIMPL
NOTRACK
NOUPDATE
Expand All @@ -370,7 +365,6 @@ ofile
oid
omus
onefuzz
ools
oop
opensource
OPTOUT
Expand All @@ -384,7 +378,6 @@ packageinuse
packageinusebyapplication
PACL
PARAMETERMAP
paramref
pathparts
Patil
pcb
Expand Down Expand Up @@ -459,7 +452,6 @@ Roblox
ronomon
Roronoa
rosoft
rowids
rowid
roy
RRF
Expand Down Expand Up @@ -532,8 +524,6 @@ TARG
taskhostw
tcs
TEMPDIRECTORY
Templating
templating
temppath
testexampleinstaller
thiscouldbeapc
Expand All @@ -544,7 +534,6 @@ tombstoned
transitioning
trimstart
ttl
typeparam
typedef
UCase
ucasemap
Expand All @@ -559,7 +548,6 @@ uninstallation
uninstaller
uninstallprevious
uninstalls
Unk
unknwn
Unknwnbase
UNMARSHALING
Expand All @@ -586,7 +574,6 @@ wcex
WDAG
webpages
Webserver
websites
website
wesome
wfsopen
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ GetRestAPIBaseUri\(".*"\) == L".*"
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)

# Compiler flags
(?:^|[\t ,"'`=(])-[D](?!ata|ependency|epth|esktop|estination|ev|irectory|ownload)
(?:^|[\t ,"'`=(])-[W](?!ait|in|orking)
(?:^|[\t ,"'`=(])-[D](?!ata|ebug|ependency|epth|esktop|estination|ev|irectory|ownload)
(?:^|[\t ,"'`=(])-[W](?!ait|arning|in|orking)
(?:^|[\t ,"'`=(])-[l](?!og)
(?:^|[\t ,"'`=(])-[f](?!eatures|ile|ind)
-T(?=h[a-z]{2,})
Expand Down
109 changes: 109 additions & 0 deletions src/PowerShell/Help/Microsoft.WinGet.Client/Add-WinGetSource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
external help file: Microsoft.WinGet.Client.Cmdlets.dll-Help.xml
Module Name: Microsoft.WinGet.Client
ms.date: 08/01/2024
online version:
schema: 2.0.0
title: Add-WinGetSource
---

# Add-WinGetSource

## SYNOPSIS
Adds a new source.

## SYNTAX

```
Add-WinGetSource -Name <String> -Argument <String> [-Type <String>] [<CommonParameters>]
```

## DESCRIPTION

Adds a new source. A source provides the data for you to discover and install packages. Only add a
new source if you trust it as a secure location. This command must be executed with administrator permissions.

## EXAMPLES

### Example 1: Add new REST source named mysource

```powershell
Add-WinGetSource -Name mysource -Argument https://contoso.com/ -Type Microsoft.Rest
```

This example adds a new REST source to WinGet named `mysource` with the root URL
`https://contoso.com/`. The source must respond with the WinGet REST source API.

## PARAMETERS

### -Argument

The URL or UNC of either a pre-indexed WinGet source or a WinGet REST source API.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Name
The name used to identify the WinGet source.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Type
The type of the WinGet source. Most sources are `Microsoft.Rest`. The WinGet community repository
is `Microsoft.PreIndexed.Package`.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[Remove-WinGetSource](Remove-WinGetSource.md)

[Reset-WinGetSource](Reset-WinGetSource.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
external help file: Microsoft.WinGet.Client.Cmdlets.dll-Help.xml
Module Name: Microsoft.WinGet.Client
ms.date: 08/01/2024
online version:
schema: 2.0.0
title: Assert-WinGetPackageManager
---

# Assert-WinGetPackageManager

## SYNOPSIS
Verifies that WinGet is installed properly.

## SYNTAX

### IntegrityVersionSet (Default)

```
Assert-WinGetPackageManager [-Version <String>] [<CommonParameters>]
```

### IntegrityLatestSet

```
Assert-WinGetPackageManager [-Latest] [-IncludePreRelease] [<CommonParameters>]
```

## DESCRIPTION

Verifies that WinGet is installed properly.

> [!NOTE]
> The cmdlet doesn't ensure that the latest version of WinGet is installed. It just verifies that
> the installed version of Winget is supported by installed version of the Microsoft.WinGet.Client
> module.
## EXAMPLES

### Example 1: Default usage

```powershell
Assert-WinGetPackageManager
```

If the current version of WinGet is installed correctly, the command returns without error.

### Example 2: Check if latest stable version is installed

```powershell
Assert-WinGetPackageManager -Latest
```

If the latest version of WinGet is compatible with the installed Microsoft.WinGet.Client module, the
command returns without error.

### Example 3: Check if latest preview version is installed

```powershell
Assert-WinGetPackageManager -IncludePreRelease
```

If the prerelease version of WinGet is compatible with the installed Microsoft.WinGet.Client module,
the command returns without error.

### Example 4: Check if specific version is installed

```powershell
Assert-WinGetPackageManager -Version v1.8.1911
```

If the specified version of WinGet is compatible with the installed Microsoft.WinGet.Client module,
the command returns without error.

## PARAMETERS

### -IncludePreRelease

Include preview versions of WinGet.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: IntegrityLatestSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Latest
Verify that the latest version of WinGet is compatible with the installed version of the
Microsoft.WinGet.Client module.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: IntegrityLatestSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Version
Verify that a specific version of WinGet is installed correctly.
```yaml
Type: System.String
Parameter Sets: IntegrityVersionSet
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String
### System.Management.Automation.SwitchParameter
## OUTPUTS
### System.Object
## NOTES
## RELATED LINKS
[Get-WinGetVersion](Get-WinGetVersion.md)
Loading

0 comments on commit 5427597

Please sign in to comment.