Windows PowerShell command on Get-command Set-PSRepository
MyWebUniversity

Windows PowerShell command on Get-command Set-PSRepository

NAME

Set-PSRepository

SYNOPSIS

Sets values for a registered repository.

SYNTAX

Set-PSRepository [-Name] [[-SourceLocation] ] [-Credential ] [-InstallationPolicy

{Trusted | Untrusted}] [-PackageManagementProvider ] [-Proxy ] [-ProxyCredential ]

[-PublishLocation ] [-ScriptPublishLocation ] [-ScriptSourceLocation ] []

DESCRIPTION

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

PARAMETERS

-Credential

@{Text=} Required? false Position? named Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-InstallationPolicy

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

Specifies the name of the repository. Required? true Position? 0 Default value None Accept pipeline input? False Accept wildcard characters? false

-PackageManagementProvider

Specifies the package management provider. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-Proxy

@{Text=} Required? false Position? named Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-ProxyCredential

@{Text=} Required? false Position? named Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-PublishLocation

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

@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-ScriptSourceLocation

@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false

-SourceLocation

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 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



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™