PDQ.com mobilePDQ.com desktop
Support

Set-PSRepository

Sets values for a registered repository.
Set-PSRepository [-Name*] <String> [[-SourceLocation] <Uri>] [-Credential <PSCredential>] [-InstallationPolicy{Trusted | Untrusted}] [-PackageManagementProvider <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>][-PublishLocation <Uri>] [-ScriptPublishLocation <Uri>] [-ScriptSourceLocation <Uri>] [<CommonParameters>]

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

Parameters

-Credential <PSCredential>

@{Text=}

-InstallationPolicy <String>

  • Default value is None
  • Accepts pipeline input False

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

-Name <String>

  • This value is required
  • Default value is None
  • Accepts pipeline input False

Specifies the name of the repository.

-PackageManagementProvider <String>

  • Default value is None
  • Accepts pipeline input False

Specifies the package management provider.

-Proxy <Uri>

@{Text=}

-ProxyCredential <PSCredential>

@{Text=}

-PublishLocation <Uri>

  • Default value is None
  • Accepts pipeline input False

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.

-ScriptPublishLocation <Uri>

  • Default value is None
  • Accepts pipeline input False

@{Text=}

-ScriptSourceLocation <Uri>

  • Default value is None
  • Accepts pipeline input False

@{Text=}

-SourceLocation <Uri>

  • Default value is None
  • Accepts pipeline input False

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.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

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

  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.

Additional Notes
 
Back to PowerShell Command list