diff --git a/reference/5.0/PackageManagement/Register-PackageSource.md b/reference/5.0/PackageManagement/Register-PackageSource.md index 4dbc1d0ccb9f..821427704a50 100644 --- a/reference/5.0/PackageManagement/Register-PackageSource.md +++ b/reference/5.0/PackageManagement/Register-PackageSource.md @@ -1,5 +1,5 @@ --- -ms.date: 06/09/2017 +ms.date: 4/1/2019 schema: 2.0.0 locale: en-us keywords: powershell,cmdlet @@ -16,36 +16,49 @@ Adds a package source for a specified package provider. ## SYNTAX ### SourceBySearch + ``` -Register-PackageSource [[-Name] ] [[-Location] ] [-Credential ] [-Trusted] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName ] [] +Register-PackageSource [[-Name] ] [[-Location] ] [-Credential ] +[-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-ProviderName ] +[] ``` ### PSModule + ``` -Register-PackageSource [[-Name] ] [[-Location] ] [-Credential ] [-Trusted] - [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-PackageManagementProvider ] [-Scope ] - [-PublishLocation ] [] +Register-PackageSource [[-Name] ] [[-Location] ] [-Credential ] +[-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] [-PackageManagementProvider ] +[-Scope ] [-PublishLocation ] [] ``` ## 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 @@ -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 @@ -76,6 +90,7 @@ Accept wildcard characters: False ``` ### -Force + Forces the command to run without asking for user confirmation. ```yaml @@ -91,6 +106,7 @@ Accept wildcard characters: False ``` ### -ForceBootstrap + Indicates that this cmdlet automatically installs the package provider. ```yaml @@ -106,6 +122,7 @@ Accept wildcard characters: False ``` ### -Location + Specifies the package source location. ```yaml @@ -121,6 +138,7 @@ Accept wildcard characters: False ``` ### -Name + Specifies the name of the package source to register. ```yaml @@ -136,6 +154,7 @@ Accept wildcard characters: False ``` ### -PackageManagementProvider + Specifies the Package Management provider. ```yaml @@ -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 @@ -167,6 +187,7 @@ Accept wildcard characters: False ``` ### -PublishLocation + Specifies the publish location. ```yaml @@ -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 @@ -198,6 +221,7 @@ Accept wildcard characters: False ``` ### -Trusted + Indicates that the package source is trusted. ```yaml @@ -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 @@ -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 @@ -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) \ No newline at end of file diff --git a/reference/5.1/PackageManagement/Register-PackageSource.md b/reference/5.1/PackageManagement/Register-PackageSource.md index cc87d5dcea79..ad9cc7af89d4 100644 --- a/reference/5.1/PackageManagement/Register-PackageSource.md +++ b/reference/5.1/PackageManagement/Register-PackageSource.md @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml keywords: powershell,cmdlet locale: en-us Module Name: PackageManagement -ms.date: 06/09/2017 +ms.date: 4/1/2019 online version: http://go.microsoft.com/fwlink/?LinkID=517139 schema: 2.0.0 title: Register-PackageSource @@ -17,45 +17,58 @@ Adds a package source for a specified package provider. ## SYNTAX ### SourceBySearch + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ProviderName ] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-ProviderName ] [] ``` ### NuGet + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ConfigFile ] [-SkipValidate] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-ConfigFile ] [-SkipValidate] [] ``` ### PowerShellGet + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-PackageManagementProvider ] [-PublishLocation ] [-ScriptSourceLocation ] - [-ScriptPublishLocation ] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-PackageManagementProvider ] [-PublishLocation ] +[-ScriptSourceLocation ] [-ScriptPublishLocation ] [] ``` ## 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 ### -ConfigFile + Specifies a configuration file. ```yaml @@ -71,7 +84,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 @@ -86,6 +100,7 @@ Accept wildcard characters: False ``` ### -Force + Forces the command to run without asking for user confirmation. ```yaml @@ -101,6 +116,7 @@ Accept wildcard characters: False ``` ### -ForceBootstrap + Indicates that this cmdlet automatically installs the package provider. ```yaml @@ -116,6 +132,7 @@ Accept wildcard characters: False ``` ### -Location + Specifies the package source location. ```yaml @@ -131,6 +148,7 @@ Accept wildcard characters: False ``` ### -Name + Specifies the name of the package source to register. ```yaml @@ -146,6 +164,7 @@ Accept wildcard characters: False ``` ### -PackageManagementProvider + Specifies the Package Management provider. ```yaml @@ -161,13 +180,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: Programs, msi, msu, NuGet, PowerShellGet, psl, chocolatey +Accepted values: chocolatey, msi, msu, NuGet, PowerShellGet, Programs, psl Required: False Position: Named @@ -177,7 +197,8 @@ Accept wildcard characters: False ``` ### -Proxy -Specifies a proxy server for the request, rather than connecting directly to the Internet resource. + +Specifies a proxy server for the request, rather than a direct connection to the internet resource. ```yaml Type: Uri @@ -192,7 +213,9 @@ Accept wildcard characters: False ``` ### -ProxyCredential -Specifies a user account that has permission to use the proxy server that is specified by the **Proxy** parameter. + +Specifies a user account that has permission to use the proxy server that is specified by the +**Proxy** parameter. ```yaml Type: PSCredential @@ -207,6 +230,7 @@ Accept wildcard characters: False ``` ### -PublishLocation + Specifies the publish location. ```yaml @@ -222,6 +246,7 @@ Accept wildcard characters: False ``` ### -ScriptPublishLocation + Specifies the script publish location. ```yaml @@ -237,6 +262,7 @@ Accept wildcard characters: False ``` ### -ScriptSourceLocation + Specifies the script source location. ```yaml @@ -252,6 +278,7 @@ Accept wildcard characters: False ``` ### -SkipValidate + Switch that skips validating the credentials of a package source. ```yaml @@ -267,6 +294,7 @@ Accept wildcard characters: False ``` ### -Trusted + Indicates that the package source is trusted. ```yaml @@ -282,6 +310,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -297,8 +326,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 @@ -313,7 +342,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 @@ -329,4 +361,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Set-PackageSource](Set-PackageSource.md) -[Unregister-PackageSource](Unregister-PackageSource.md) +[Unregister-PackageSource](Unregister-PackageSource.md) \ No newline at end of file diff --git a/reference/6/PackageManagement/Register-PackageSource.md b/reference/6/PackageManagement/Register-PackageSource.md index 5362c52ebd32..61e11ea82e0d 100644 --- a/reference/6/PackageManagement/Register-PackageSource.md +++ b/reference/6/PackageManagement/Register-PackageSource.md @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.PackageManagement.dll-Help.xml keywords: powershell,cmdlet locale: en-us Module Name: PackageManagement -ms.date: 06/09/2017 +ms.date: 4/1/2019 online version: http://go.microsoft.com/fwlink/?LinkID=517139 schema: 2.0.0 title: Register-PackageSource @@ -17,45 +17,58 @@ Adds a package source for a specified package provider. ## SYNTAX ### SourceBySearch + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ProviderName ] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-ProviderName ] [] ``` ### NuGet + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-ConfigFile ] [-SkipValidate] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-ConfigFile ] [-SkipValidate] [] ``` ### PowerShellGet + ``` Register-PackageSource [-Proxy ] [-ProxyCredential ] [[-Name] ] - [[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm] - [-PackageManagementProvider ] [-PublishLocation ] [-ScriptSourceLocation ] - [-ScriptPublishLocation ] [] +[[-Location] ] [-Credential ] [-Trusted] [-Force] [-ForceBootstrap] [-WhatIf] +[-Confirm] [-PackageManagementProvider ] [-PublishLocation ] +[-ScriptSourceLocation ] [-ScriptPublishLocation ] [] ``` ## 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 ### -ConfigFile + Specifies a configuration file. ```yaml @@ -71,6 +84,7 @@ Accept wildcard characters: False ``` ### -Credential + Specifies a user account that has permission to access the authenticated location. ```yaml @@ -86,6 +100,7 @@ Accept wildcard characters: False ``` ### -Force + Forces the command to run without asking for user confirmation. ```yaml @@ -101,6 +116,7 @@ Accept wildcard characters: False ``` ### -ForceBootstrap + Indicates that this cmdlet automatically installs the package provider. ```yaml @@ -116,6 +132,7 @@ Accept wildcard characters: False ``` ### -Location + Specifies the package source location. ```yaml @@ -131,6 +148,7 @@ Accept wildcard characters: False ``` ### -Name + Specifies the name of the package source to register. ```yaml @@ -146,6 +164,7 @@ Accept wildcard characters: False ``` ### -PackageManagementProvider + Specifies the Package Management provider. ```yaml @@ -161,7 +180,8 @@ Accept wildcard characters: False ``` ### -ProviderName -Specifies the provider name. + +Specifies the package provider's name. ```yaml Type: String @@ -178,6 +198,8 @@ Accept wildcard characters: False ### -Proxy +Specifies a proxy server for the request, rather than a direct connection to the internet resource. + ```yaml Type: Uri Parameter Sets: (All) @@ -192,6 +214,9 @@ Accept wildcard characters: False ### -ProxyCredential +Specifies a user account that has permission to use the proxy server that is specified by the +**Proxy** parameter. + ```yaml Type: PSCredential Parameter Sets: (All) @@ -205,6 +230,7 @@ Accept wildcard characters: False ``` ### -PublishLocation + Specifies the publish location. ```yaml @@ -220,6 +246,7 @@ Accept wildcard characters: False ``` ### -ScriptPublishLocation + Specifies the script publish location. ```yaml @@ -235,6 +262,7 @@ Accept wildcard characters: False ``` ### -ScriptSourceLocation + Specifies the script source location. ```yaml @@ -250,8 +278,8 @@ Accept wildcard characters: False ``` ### -SkipValidate -Switch that skips validating the credentials of a package source. +Switch that skips validating the credentials of a package source. ```yaml Type: SwitchParameter @@ -266,6 +294,7 @@ Accept wildcard characters: False ``` ### -Trusted + Indicates that the package source is trusted. ```yaml @@ -281,6 +310,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -296,8 +326,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 @@ -312,7 +342,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 @@ -328,4 +361,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Set-PackageSource](Set-PackageSource.md) -[Unregister-PackageSource](Unregister-PackageSource.md) +[Unregister-PackageSource](Unregister-PackageSource.md) \ No newline at end of file