< Back

Get-NexusRepository

Sat Jan 18, 2020 5:15 pm

NAME Get-NexusRepository



SYNOPSIS

Gets a list of the available Nexus repositories.





SYNTAX

Get-NexusRepository [-Uri] <String> [-Credential] <PSCredential> [<CommonParameters>]





DESCRIPTION

Gets a list of the available Nexus repositories.





PARAMETERS

-Uri <String>

Uri of the Nexus repository server (for example https://nexus.myorg.local).



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>

User credentials that have permission to request a list of repositories.



Required? true

Position? 2

Default value

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





The basic code of this function was borrowed from the chocolatey-nexus-repo package

(https://chocolatey.org/packages/chocolatey-nexus-repo). Credit to Stephen Valdinger and Paul Broadwith.



For a list of the repository API calls see

https://github.com/sonatype/nexus-publi ... natype/nex

us/script/plugin/RepositoryApi.java



Nexus 3 REST and API reference https://help.sonatype.com/repomanager3/ ... ration-api



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$creds = Get-Credential



Get-NexusRepository -Uri 'http://localhost:8081' -Credential $creds



Returns a list of the repositories available ont he Nexus repository server at http://localhost:8081 using the

credentials $creds.











RELATED LINKS

https://github.com/pauby/NexusManagemen ... ository.md