This script already exists. Creating an Azure App registration for the restore portal and enabling the portal in VBO was covered by Chris in the community 1 month ago: https://community.veeam.com/script-libr ... ripts-2350
I wrote what he wrote for each part except how to create Azure application because there is no veeam powershell commandlet at this time. I will integrate New-VB365EnterpriseApplication.ps1 for this to work .