The Set-PSRepository cmdlet sets values for a registered module repository. The settings are
persistent for the current user and apply to all versions of PowerShell installed for that user.
Příklady
Example 1: Set the installation policy for a repository
This command sets the installation policy for the myInternalSource repository to Trusted, so
that you are not prompted before installing modules from that source.
Example 2: Set the source and publish locations for a repository
Specifies the URI of the publish location. For example, for NuGet-based repositories, the publish
location is similar to https://someNuGetUrl.com/api/v2/Packages.
Specifies the URI for discovering and installing modules from this repository. For example, for
NuGet-based repositories, the source location is similar to https://someNuGetUrl.com/api/v2.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
versions 1.0 and 1.1. If you are not using TLS 1.2 or higher, you will receive an error when
trying to access the PowerShell Gallery. Use the following command to ensure you are using TLS
1.2:
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.