< Back

Get-JenkinsCrumb

Wed Jan 15, 2020 10:29 am

NAME Get-JenkinsCrumb



SYNOPSIS

Gets a Jenkins Crumb.





SYNTAX

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





DESCRIPTION

This cmdlet is used to obtain a crumb that must be passed to all other commands to a Jenkins Server if CSRF is

enabled in Global Settings of the server. The crumb must be added to the header of any commands or requests sent

to this master.





PARAMETERS

-Uri <String>

Contains the Uri to the Jenkins Master server to obtain the crumb from.



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



<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

The crumb string.







NOTES









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



PS C:\\>Get-JenkinsCrumb `

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

-Credential (Get-Credential)



Returns a Jenkins Crumb.



RELATED LINKS