src/PowerShell/Help/Microsoft.WinGet.Client/Add-WinGetSource.md
Adds a new source.
Add-WinGetSource -Name <String> -Argument <String> [-Type <String>] [-TrustLevel {Default | None | Trusted}] [-Explicit] [<CommonParameters>]
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.
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.
The URL or UNC of either a pre-indexed WinGet source or a WinGet REST source API.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
The name used to identify the WinGet source.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Excludes a source from discovery unless specified.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specify the trust level of the WinGet source. The parameter accepts the following values:
NoneTrustedType: Microsoft.WinGet.Client.PSObjects.PSSourceTrustLevel
Parameter Sets: (All)
Aliases:
Accepted values: None, Trusted
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The type of the WinGet source. Most sources are Microsoft.Rest. The WinGet community repository
is Microsoft.PreIndexed.Package.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
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.