The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
While searching for a solution, as I needed to bulk disable 300+ users, I found the PS module JiraPS, which I've used here, to make a simple bulk disable script.
PowerShell script for disabling users in bulk
If(-not(Get-InstalledModule ImportExcel -ErrorAction silentlycontinue)){ Install-Module ImportExcel -Confirm:$False -Force }
If(-not(Get-InstalledModule jiraps -ErrorAction silentlycontinue)){ Install-Module jiraps -Confirm:$False -Force }
Set-JiraConfigServer -Server "https://jira.Base.Url"
$cred = get-credential #admin credentials e.g jira-admin
$XLSXFile = Import-Excel -path C:\Users\<user<\Downloads\Book1.xlsx
#File containing Username, Email, login, etc. in a listed table
foreach ($x in $XLSXFile){ $disable = Get-JiraUser -UserName $x.Username -IncludeInactive -credential $cred
foreach ($d in $disable){ Set-JiraUser -User $d -Active 0 -credential $cred }}
the excel looks like this:
Username | Full Name | Last Login |
mer@domain | Maria | 15/08/2016 12:38 |
lso@domain | Lea | 08/12/2016 10:40 |
ch@domain | Casper | 24/06/2017 04:42 |
cvi@domain | Christian | 01/10/2019 10:42 |
Karina@domain | Karina | 07/10/2019 08:45 |
rikke@domain | Rikke | 08/10/2019 09:05 |
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events