< Back

Get-JiraUser

Thu Jan 16, 2020 8:01 am

NAME Get-JiraUser



SYNOPSIS

Returns a user from Jira





SYNTAX

Get-JiraUser [-UserName] <String[]> [-Exact] [-IncludeInactive] [-MaxResults <UInt32>] [-Skip <UInt64>]

[-Credential <PSCredential>] [<CommonParameters>]



Get-JiraUser [-InputObject] <Object[]> [-Exact] [-IncludeInactive] [-Credential <PSCredential>]

[<CommonParameters>]





DESCRIPTION

This function returns information regarding a specified user from Jira.





PARAMETERS

-UserName <String[]>

Name of the user to search for.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-InputObject <Object[]>

User Object of the user.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Exact [<SwitchParameter>]

Limits the search to users where the username is exactly the term searched for.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-IncludeInactive [<SwitchParameter>]

Include inactive users in the search



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-MaxResults <UInt32>

Maximum number of user to be returned.



> The API does not allow for any value higher than 1000.



Required? false

Position? named

Default value 50

Accept pipeline input? False

Accept wildcard characters? false



-Skip <UInt64>

Controls how many objects will be skipped before starting output.



Defaults to 0.



Required? false

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Credentials to use to connect to JIRA. If not specified, this function will use anonymous access.



Required? false

Position? named

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

[String[]]

Username, name, or e-mail address





OUTPUTS

[JiraPS.User]







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 --------------------------



Get-JiraUser -UserName user1



Returns information about all users with username like user1

-------------------------- EXAMPLE 2 --------------------------



Get-ADUser -filter "Name -like 'John*Smith'" | Select-Object -ExpandProperty samAccountName | Get-JiraUser

-Credential $cred



This example searches Active Directory for "John*Smith", then obtains their JIRA user accounts.

-------------------------- EXAMPLE 3 --------------------------



Get-JiraUser -Credential $cred



This example returns the JIRA user that is executing the command.

-------------------------- EXAMPLE 4 --------------------------



Get-JiraUser -UserName user1 -Exact



Returns information about user user1

-------------------------- EXAMPLE 5 --------------------------



Get-JiraUser -UserName ""



Returns information about all users. The empty string "" matches all users.



RELATED LINKS

Online Version: https://atlassianps.org/docs/JiraPS/com ... -JiraUser/

New-JiraUser

Remove-JiraUser