@Johan Berg Thanks for posting in Q&A. To use PowerShell script to get all the ESP, I have tested the script as below. Insert the Global Administrator account. And then it will list all the ESPs' id and displayname.
You can rename the ESP.txtto ESP.ps1 and run the script.
Hope the above information can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.