Skip to content

Commit

Permalink
copyedits, style (#4098)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsmatlak authored and sdwheeler committed Apr 2, 2019
1 parent b2196c6 commit 804a1ca
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 67 deletions.
71 changes: 49 additions & 22 deletions reference/5.0/PackageManagement/Register-PackageSource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 06/09/2017
ms.date: 4/1/2019
schema: 2.0.0
locale: en-us
keywords: powershell,cmdlet
Expand All @@ -16,36 +16,49 @@ Adds a package source for a specified package provider.
## SYNTAX

### SourceBySearch

```
Register-PackageSource [[-Name] <String>] [[-Location] <String>] [-Credential <PSCredential>] [-Trusted]
[-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName <String>] [<CommonParameters>]
Register-PackageSource [[-Name] <string>] [[-Location] <string>] [-Credential <pscredential>]
[-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName <string>]
[<CommonParameters>]
```

### PSModule

```
Register-PackageSource [[-Name] <String>] [[-Location] <String>] [-Credential <PSCredential>] [-Trusted]
[-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-PackageManagementProvider <String>] [-Scope <String>]
[-PublishLocation <String>] [<CommonParameters>]
Register-PackageSource [[-Name] <string>] [[-Location] <string>] [-Credential <pscredential>]
[-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-PackageManagementProvider <string>]
[-Scope <string>] [-PublishLocation <string>] [<CommonParameters>]
```

## DESCRIPTION
The **Register-PackageSource** cmdlet adds a package source for a specified package provider.
Package sources are always managed by a package provider.
If the package provider cannot add or replace a package source, the provider generates an error message.

The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package
sources are always managed by a package provider. If the package provider cannot add or replace a
package source, the provider generates an error message.

## EXAMPLES

### Example 1: Register a package source for the NuGet provider
```
PS C:\> Register-PackageSource -Name "MyRep" -Location "http://contoso/psmodule/Features/api/v3" -ProviderName "PsModule"

This command registers a package source, a web-based location for the **NuGet** provider. By
default, sources aren't trusted. You are prompted to confirm the source is trusted before packages
are installed. To override the default, use the `-Trusted` parameter.

```powershell
Register-PackageSource -Name MyNuGet -Location https://www.nuget.org/api/v2 -ProviderName NuGet
```

This command registers a package source, a web-based location for the **PSModule** provider.
If you do not add the *Trusted* parameter, by default, the package is not trusted, and users are prompted to confirm that they trust the source before installing packages from the source.
```Output
Name ProviderName IsTrusted Location
---- ------------ --------- --------
MyNuGet NuGet False https://www.nuget.org/api/v2
```

## PARAMETERS

### -Confirm

Prompts you for confirmation before running the cmdlet.

```yaml
Expand All @@ -61,7 +74,8 @@ Accept wildcard characters: False
```
### -Credential
Specifies a user account that has permission to install package providers.
Specifies a user account that has permission to access the authenticated location.
```yaml
Type: PSCredential
Expand All @@ -76,6 +90,7 @@ Accept wildcard characters: False
```
### -Force
Forces the command to run without asking for user confirmation.
```yaml
Expand All @@ -91,6 +106,7 @@ Accept wildcard characters: False
```
### -ForceBootstrap
Indicates that this cmdlet automatically installs the package provider.
```yaml
Expand All @@ -106,6 +122,7 @@ Accept wildcard characters: False
```
### -Location
Specifies the package source location.
```yaml
Expand All @@ -121,6 +138,7 @@ Accept wildcard characters: False
```
### -Name
Specifies the name of the package source to register.
```yaml
Expand All @@ -136,6 +154,7 @@ Accept wildcard characters: False
```
### -PackageManagementProvider
Specifies the Package Management provider.
```yaml
Expand All @@ -151,13 +170,14 @@ Accept wildcard characters: False
```
### -ProviderName
Specifies the provider name.
Specifies the package provider's name.
```yaml
Type: String
Parameter Sets: SourceBySearch
Aliases: Provider
Accepted values: msi, Programs, msu, Bootstrap, PSModule, nuget, chocolatey
Accepted values: Bootstrap, chocolatey, msi, msu, NuGet, Programs, PSModule

Required: False
Position: Named
Expand All @@ -167,6 +187,7 @@ Accept wildcard characters: False
```
### -PublishLocation
Specifies the publish location.
```yaml
Expand All @@ -182,7 +203,9 @@ Accept wildcard characters: False
```
### -Scope
Specifies the scope of the Package Source. The acceptable values for this parameter are: AllUsers and CurrentUser.
Specifies the scope of the Package Source. The acceptable values for this parameter are: AllUsers
and CurrentUser.
```yaml
Type: String
Expand All @@ -198,6 +221,7 @@ Accept wildcard characters: False
```
### -Trusted
Indicates that the package source is trusted.
```yaml
Expand All @@ -213,8 +237,8 @@ Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: SwitchParameter
Expand All @@ -229,7 +253,10 @@ Accept wildcard characters: False
```
### CommonParameters
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).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
Expand All @@ -239,10 +266,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_packagemanagement.md)
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
[Get-PackageSource](Get-PackageSource.md)
[Set-PackageSource](Set-PackageSource.md)
[Unregister-PackageSource](Unregister-PackageSource.md)
[Unregister-PackageSource](Unregister-PackageSource.md)
Loading

0 comments on commit 804a1ca

Please sign in to comment.