On this page

Get-JiraUser

SYNOPSIS

Returns a user from Jira

SYNTAX

Self (Default)

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

ByUserName

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

ByInputObject

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

DESCRIPTION

This function returns information regarding a specified user from Jira.

EXAMPLES

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.

PARAMETERS

-UserName

Name of the user to search for.

Type: String[]
Parameter Sets: ByUserName
Aliases: User, Name

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject

User Object of the user.

Type: Object[]
Parameter Sets: ByInputObject
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exact

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

Type: Switch
Parameter Sets: ByUserName, ByInputObject
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeInactive

Include inactive users in the search

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-MaxResults

Maximum number of user to be returned.

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

Type: UInt32
Parameter Sets: ByUserName
Aliases:

Required: False
Position: Named
Default value: 50
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Controls how many objects will be skipped before starting output.

Defaults to 0.

Type: UInt64
Parameter Sets: ByUserName
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Credential

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

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://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.

New-JiraUser

Remove-JiraUser