In this article you will find out how to write a script which will loop through all existing projects and save all project name and project keys to a .csv file. This script is compatible with Power Scripts for Jira for Server/DC/Cloud.
First of all you have to assign allProjects() to a string which you will use to access all projects that you have in Jira.
...
You can also edit this script and adjust it to your needs using other data that is available to return when using admProjectProperties
more details here :
Final code should look like this :
...