< Back

Set-PSRepository

Wed Jan 30, 2019 5:57 pm

NAME Set-PSRepository



SYNOPSIS

Sets values for a registered repository.





SYNTAX

Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-Credential <PSCredential>] [-InstallationPolicy {Trusted | Untrusted}]

[-PackageManagementProvider <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <Uri>] [-ScriptPublishLocation <Uri>]

[-ScriptSourceLocation <Uri>] [<CommonParameters>]





DESCRIPTION

The Set-PSRepository cmdlet sets values for a registered module repository.





PARAMETERS

-Credential <PSCredential>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-InstallationPolicy <String>

Specifies the installation policy. Valid values are: Trusted, UnTrusted.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the repository.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PackageManagementProvider <String>

Specifies the package management provider.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Proxy <Uri>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ProxyCredential <PSCredential>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PublishLocation <Uri>

Specifies the URI of the publish location. For example, for NuGet-based repositories, the publish location is similar to

http://someNuGetUrl.com/api/v2/Packages.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ScriptPublishLocation <Uri>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ScriptSourceLocation <Uri>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SourceLocation <Uri>

Specifies the URI for discovering and installing modules from this repository. For example, for NuGet-based repositories, the source location is

similar to http://someNuGetUrl.com/api/v2.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









Example 1: Set the installation policy for a repository



PS C:\\>Set-PSRepository -Name "myInternalSource" -InstallationPolicy Trusted



This command sets the installation policy for the myInternalSource repository to Trusted, so that users are not prompted before installing modules from

that source.

Example 2: Set the source and publish locations for a repository



PS C:\\>Set-PSRepository -Name "myInternalSource" -SourceLocation 'http://someNuGetUrl.com/api/v2' -PublishLocation

'http://someNuGetUrl.com/api/v2/packages'



This command sets the source location and publish location for myInternalSource to the specified URIs.



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=821671

Get-PSRepository

Register-PSRepository

Unregister-PSRepository