< Back

Set-JiraUser

Thu Jan 16, 2020 8:22 am

NAME Set-JiraUser



SYNOPSIS

Modifies user properties in JIRA





SYNTAX

Set-JiraUser [-User] <Object[]> [-DisplayName <String>] [-EmailAddress <String>] [-Credential <PSCredential>]

[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]



Set-JiraUser [-User] <Object[]> [-Property] <Hashtable> [-Credential <PSCredential>] [-PassThru] [-WhatIf]

[-Confirm] [<CommonParameters>]





DESCRIPTION

This function modifies user properties in JIRA, allowing you to change a user's e-mail address, display name, and

any other properties supported by JIRA's API.





PARAMETERS

-User <Object[]>

Username or user object obtained from `Get-JiraUser`.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-DisplayName <String>

Display name to set.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EmailAddress <String>

E-mail address to set.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Property <Hashtable>

Hashtable (dictionary) of additional information to set.



Required? true

Position? 2

Default value None

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



-PassThru [<SwitchParameter>]

Whether output should be provided after invoking this function.



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

[JiraPS.User]







OUTPUTS

[JiraPS.User]

If the `-PassThru` parameter is provided, this function will provide a reference to the JIRA user modified.

Otherwise, this function does not provide output.





NOTES





It is currently NOT possible to enable and disable users with this function. JIRA does not currently provide

this ability via their REST API.



> If you'd like to see this ability added to JIRA and to this module, please vote on Atlassian's site for this

issue: https://jira.atlassian.com/browse/JRA-37294 (https://jira.atlassian.com/browse/JRA-37294)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 --------------------------



Set-JiraUser -User user1 -EmailAddress user1_new@example.com



Modifies user1's e-mail address to a new value. The original value is overridden.

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



Set-JiraUser -User user2 -Properties @{EmailAddress='user2_new@example.com';DisplayName='User 2'}



This example modifies a user's properties using a hashtable. This allows updating properties that are not exposed

as parameters to this function.



RELATED LINKS

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

New-JiraUser

Get-JiraUser