< Back
New-NexusNugetHostedRepository
Post
NAME New-NexusNugetHostedRepository
SYNOPSIS
Creates a new Nexus Nuget Hosted repository.
SYNTAX
New-NexusNugetHostedRepository [-Uri] <String> [-Credential] <PSCredential> [-Name] <String> [[-BlobStoreName]
<String>] [-NoStrictContentTypeValidation] [[-DeploymentPolicy] <String>] [<CommonParameters>]
DESCRIPTION
Creates a new Nexus Nuget Hosted repository.
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
-Name <String>
Name of the repository to create.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-BlobStoreName <String>
Blob store name to use to store the repository. By default is 'default'.
Required? false
Position? 4
Default value default
Accept pipeline input? false
Accept wildcard characters? false
-NoStrictContentTypeValidation [<SwitchParameter>]
Turns off strict content type validation (turned on by default)
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DeploymentPolicy <String>
Specifies the Deployment Policy for the repository
Required? false
Position? 5
Default value Allow Redeploy
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
For the valid WritePolicy see
https://github.com/sonatype/nexus-publi ... natype/nex
us/repository/storage/WritePolicy.java
Nexus 3 REST and API reference https://help.sonatype.com/repomanager3/ ... ration-api
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$creds = Get-Credential
Get-NexusNugetHostedRepository -Uri 'http://localhost:8081' -Credential $creds ` -Name 'myRepo'
-NoStrictContentTypeValidation
Creates a new Nuget hosted Nexus repository called myRepo on the default blob store with no strict content type
validation and with a deployment policy of allow at the Nexus repository server 'http://localhost:8081# using the
credentials $creds
RELATED LINKS
https://github.com/pauby/NexusManagemen ... ository.md
SYNOPSIS
Creates a new Nexus Nuget Hosted repository.
SYNTAX
New-NexusNugetHostedRepository [-Uri] <String> [-Credential] <PSCredential> [-Name] <String> [[-BlobStoreName]
<String>] [-NoStrictContentTypeValidation] [[-DeploymentPolicy] <String>] [<CommonParameters>]
DESCRIPTION
Creates a new Nexus Nuget Hosted repository.
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
-Name <String>
Name of the repository to create.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-BlobStoreName <String>
Blob store name to use to store the repository. By default is 'default'.
Required? false
Position? 4
Default value default
Accept pipeline input? false
Accept wildcard characters? false
-NoStrictContentTypeValidation [<SwitchParameter>]
Turns off strict content type validation (turned on by default)
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DeploymentPolicy <String>
Specifies the Deployment Policy for the repository
Required? false
Position? 5
Default value Allow Redeploy
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
For the valid WritePolicy see
https://github.com/sonatype/nexus-publi ... natype/nex
us/repository/storage/WritePolicy.java
Nexus 3 REST and API reference https://help.sonatype.com/repomanager3/ ... ration-api
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$creds = Get-Credential
Get-NexusNugetHostedRepository -Uri 'http://localhost:8081' -Credential $creds ` -Name 'myRepo'
-NoStrictContentTypeValidation
Creates a new Nuget hosted Nexus repository called myRepo on the default blob store with no strict content type
validation and with a deployment policy of allow at the Nexus repository server 'http://localhost:8081# using the
credentials $creds
RELATED LINKS
https://github.com/pauby/NexusManagemen ... ository.md