< Back

Rename-JenkinsJob

Wed Jan 15, 2020 10:43 am

NAME Rename-JenkinsJob



SYNOPSIS

Renames an existing Jenkins Job.





SYNTAX

Rename-JenkinsJob [-Uri] <String> [[-Credential] <PSCredential>] [[-Crumb] <String>] [-Name] <String> [-NewName]

<String> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Renames an existing Jenkins Job in the specified Jenkins Master server. If the job does not exist or a job with

the new name exists already an error will occur.





PARAMETERS

-Uri <String>

Contains the Uri to the Jenkins Master server that contains the existing job.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Contains the credentials to use to authenticate with the Jenkins Master server.



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Crumb <String>

Contains a Crumb to pass to the Jenkins Master Server if CSRF is enabled.



Required? false

Position? 4

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

The name of the job to rename.



Required? true

Position? 5

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NewName <String>

The new name to rename the job to.



Required? true

Position? 6

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Force the rename to occur.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

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

None.







NOTES









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



PS C:\\>Rename-JenkinsJob `

-Uri 'https://jenkins.contoso.com' \\`

-Credential (Get-Credential) \\`

-Name 'My App Build' \\`

-NewName 'My Renamed Build' \\`

-Verbose



Rename the 'My App Build' job on https://jenkins.contoso.com to 'My Renamed Build' using the credentials provided

by the user.



RELATED LINKS





CommonParameters : True

WorkflowCommonParameters : False

details : @{name=Resolve-JenkinsCommandUri; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : None

alertSet :

description :

examples :

Synopsis :

Resolve-JenkinsCommandUri [[-Folder] <string>] [[-JobName] <string>] [-Command] <string>

[<CommonParameters>]



ModuleName : Jenkins

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : Resolve-JenkinsCommandUri

Category : Function

Component :

Role :

Functionality :