Getting a list of Key Vaults and Access Policies

I am doing a bit of cleaning up at work, merging some of my Automation Accounts, moving stuff around, renaming some Key Vaults (why is naming something so hard!!?) and wanted to get a list of all my Key Vaults and their Access Policies.

I had been maintaining a list in SharePoint Online manually, but I don’t trust myself. :) Wanted to generate something to get the current state. I came up with the following PowerShell script:

Maybe it helps someone…