< Back

New-JiraSession

Thu Jan 16, 2020 8:08 am

NAME New-JiraSession



SYNOPSIS

Creates a persistent JIRA authenticated session which can be used by other JiraPS functions





SYNTAX

New-JiraSession [-Credential] <PSCredential> [[-Headers] <Hashtable>] [<CommonParameters>]





DESCRIPTION

This function creates a persistent, authenticated session in to JIRA which can be used by all other JiraPS

functions instead of explicitly passing parameters.



This removes the need to use the `-Credential` parameter constantly for each function call.



You can find more information in about_JiraPS_Authentication (../../about/authentication.html)





PARAMETERS

-Credential <PSCredential>

Credentials to use to connect to JIRA.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Headers <Hashtable>

Additional Headers



Required? false

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

[PSCredential]







OUTPUTS

[JiraPS.Session]







NOTES





This function requires either the `-Credential` parameter to be passed or a persistent JIRA session. See

`New-JiraSession` for more details. If neither are supplied, this function will run with anonymous access to

JIRA.



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



New-JiraSession -Credential (Get-Credential jiraUsername)

Get-JiraIssue TEST-01



Creates a Jira session for jiraUsername. The following `Get-JiraIssue` is run using the saved session for

jiraUsername.



RELATED LINKS

Online Version: https://atlassianps.org/docs/JiraPS/com ... raSession/

about_JiraPS_Authentication

Get-JiraSession