Add-WinGetSource.md (3113B)
1 --- 2 external help file: Microsoft.WinGet.Client.Cmdlets.dll-Help.xml 3 Module Name: Microsoft.WinGet.Client 4 ms.date: 08/01/2024 5 online version: 6 schema: 2.0.0 7 title: Add-WinGetSource 8 --- 9 10 # Add-WinGetSource 11 12 ## SYNOPSIS 13 Adds a new source. 14 15 ## SYNTAX 16 17 ``` 18 Add-WinGetSource -Name <String> -Argument <String> [-Type <String>] [-TrustLevel {Default | None | Trusted}] [-Explicit] [<CommonParameters>] 19 ``` 20 21 ## DESCRIPTION 22 23 Adds a new source. A source provides the data for you to discover and install packages. Only add a 24 new source if you trust it as a secure location. This command must be executed with administrator permissions. 25 26 ## EXAMPLES 27 28 ### Example 1: Add new REST source named mysource 29 30 ```powershell 31 Add-WinGetSource -Name mysource -Argument https://contoso.com/ -Type Microsoft.Rest 32 ``` 33 34 This example adds a new REST source to WinGet named `mysource` with the root URL 35 `https://contoso.com/`. The source must respond with the WinGet REST source API. 36 37 ## PARAMETERS 38 39 ### -Argument 40 41 The URL or UNC of either a pre-indexed WinGet source or a WinGet REST source API. 42 43 ```yaml 44 Type: System.String 45 Parameter Sets: (All) 46 Aliases: 47 48 Required: True 49 Position: Named 50 Default value: None 51 Accept pipeline input: True (ByPropertyName, ByValue) 52 Accept wildcard characters: False 53 ``` 54 55 ### -Name 56 57 The name used to identify the WinGet source. 58 59 ```yaml 60 Type: System.String 61 Parameter Sets: (All) 62 Aliases: 63 64 Required: True 65 Position: Named 66 Default value: None 67 Accept pipeline input: True (ByPropertyName, ByValue) 68 Accept wildcard characters: False 69 ``` 70 71 ### -Explicit 72 73 Excludes a source from discovery unless specified. 74 75 ```yaml 76 Type: System.Management.Automation.SwitchParameter 77 Parameter Sets: (All) 78 Aliases: 79 80 Required: False 81 Position: Named 82 Default value: None 83 Accept pipeline input: True (ByPropertyName) 84 Accept wildcard characters: False 85 ``` 86 87 ### -TrustLevel 88 89 Specify the trust level of the WinGet source. The parameter accepts the following values: 90 91 - `None` 92 - `Trusted` 93 94 ```yaml 95 Type: Microsoft.WinGet.Client.PSObjects.PSSourceTrustLevel 96 Parameter Sets: (All) 97 Aliases: 98 Accepted values: None, Trusted 99 100 Required: False 101 Position: Named 102 Default value: None 103 Accept pipeline input: True (ByPropertyName) 104 Accept wildcard characters: False 105 ``` 106 107 ### -Type 108 109 The type of the WinGet source. Most sources are `Microsoft.Rest`. The WinGet community repository 110 is `Microsoft.PreIndexed.Package`. 111 112 ```yaml 113 Type: System.String 114 Parameter Sets: (All) 115 Aliases: 116 117 Required: False 118 Position: Named 119 Default value: None 120 Accept pipeline input: True (ByPropertyName, ByValue) 121 Accept wildcard characters: False 122 ``` 123 124 ### CommonParameters 125 126 This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, 127 -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, 128 -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see 129 [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 130 131 ## INPUTS 132 133 ### System.String 134 135 ## OUTPUTS 136 137 ### System.Object 138 139 ## NOTES 140 141 ## RELATED LINKS 142 143 [Remove-WinGetSource](Remove-WinGetSource.md) 144 145 [Reset-WinGetSource](Reset-WinGetSource.md)