I want to automate index rebuilding or reorganize on multiple instances and databases using powershell. I have the query below: